Unknown Error in Facebook Apps. when get user info-Collection of common programming errors
The problem is.. that when I try to login the user and then get the user info, I get error from Facebook API. with error code: 1 The same code works for one server, but not another one. THe config and everything are the same, except the non-working one is hosted at RackSpace cloud environment. I don’t know if that’s the cuase.
Information is here:
Server: Nginx. PHP 5
Backend: running Zend framework
API: use FB's facebook.php and facebookapi_php5_restlib.php
fail at the call_method, post_request(), when calling ” facebook.users.getInfo “
Here is the error message
Exception Error Code: 1 Message: An unknown error occurred
#0 /home/www/entouraxyz-dev.sector3gamez.com/site_prod/_library/facebook/facebookapi_php5_restlib.php(956): FacebookRestClient->call_method('facebook.fql.qu...', Array)
#1 /home/www/entouraxyz-dev.sector3gamez.com/site_prod/app/facebook/controllers/FacebookController.php(375): FacebookRestClient->fql_query('SELECT uid, fir...')
#2 /home/www/entouraxyz-dev.sector3gamez.com/site_prod/app/facebook/controllers/FacebookController.php(114): Facebook_FacebookController->_facebook_login()
#3 /home/www/entouraxyz-dev.sector3gamez.com/site_prod/_library/Zend/Controller/Action.php(132): Facebook_FacebookController->init()
#4 /home/www/entouraxyz-dev.sector3gamez.com/site_prod/_library/Zend/Controller/Dispatcher/Standard.php(261): Zend_Controller_Action->__construct(Object(Zend_Controller_Request_Http), Object(Zend_Controller_Response_Http), Array)
#5 /home/www/entouraxyz-dev.sector3gamez.com/site_prod/_library/Zend/Controller/Front.php(945): Zend_Controller_Dispatcher_Standard->dispatch(Object(Zend_Controller_Request_Http), Object(Zend_Controller_Response_Http))
#6 /home/www/entourxyz-dev.sector3gamez.com/site_prod/_library/Zcms/Application.php(226): Zend_Controller_Front->dispatch()
#7 /home/www/entourxyz-dev.sector3gamez.com/site_prod/index.php(38): Zcms_Application::run('MainPlugin')
#8 {main}
I have tested the PHPInfo. exactly the same. Max Execute timeout is 60sec. and CURL timeout is increased to 60 too. so. it may not be the timeout issue.
-
I have found that the Facebook API will shut you out for a day or so (not tested how long exactly) when you’ve been testing your app and been sending a lot of invalid (?) requests.
Wait a while and it will likely work again. The reason it happens on one server only will likely be the IP address.
All of this is speculated since Facebook won’t specify anything regarding limitation or blocking, for security reasons.
Originally posted 2013-11-09 23:06:38.