{"id":958,"date":"2022-08-30T15:10:01","date_gmt":"2022-08-30T15:10:01","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2013\/11\/09\/unknown-error-in-facebook-apps-when-get-user-info-collection-of-common-programming-errors\/"},"modified":"2022-08-30T15:10:01","modified_gmt":"2022-08-30T15:10:01","slug":"unknown-error-in-facebook-apps-when-get-user-info-collection-of-common-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2022\/08\/30\/unknown-error-in-facebook-apps-when-get-user-info-collection-of-common-programming-errors\/","title":{"rendered":"Unknown Error in Facebook Apps. when get user info-Collection of common programming errors"},"content":{"rendered":"<p>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&#8217;t know if that&#8217;s the cuase.<\/p>\n<pre><code>Information is here:\nServer: Nginx. PHP 5\nBackend: running Zend framework\nAPI: use FB's facebook.php  and   facebookapi_php5_restlib.php\n<\/code><\/pre>\n<p>fail at the call_method, post_request(), when calling &#8221; facebook.users.getInfo &#8220;<\/p>\n<p>Here is the error message<\/p>\n<p>Exception Error Code: 1 Message: An unknown error occurred<\/p>\n<pre><code>#0 \/home\/www\/entouraxyz-dev.sector3gamez.com\/site_prod\/_library\/facebook\/facebookapi_php5_restlib.php(956): FacebookRestClient-&gt;call_method('facebook.fql.qu...', Array)\n#1 \/home\/www\/entouraxyz-dev.sector3gamez.com\/site_prod\/app\/facebook\/controllers\/FacebookController.php(375): FacebookRestClient-&gt;fql_query('SELECT uid, fir...')\n#2 \/home\/www\/entouraxyz-dev.sector3gamez.com\/site_prod\/app\/facebook\/controllers\/FacebookController.php(114): Facebook_FacebookController-&gt;_facebook_login()\n#3 \/home\/www\/entouraxyz-dev.sector3gamez.com\/site_prod\/_library\/Zend\/Controller\/Action.php(132): Facebook_FacebookController-&gt;init()\n#4 \/home\/www\/entouraxyz-dev.sector3gamez.com\/site_prod\/_library\/Zend\/Controller\/Dispatcher\/Standard.php(261): Zend_Controller_Action-&gt;__construct(Object(Zend_Controller_Request_Http), Object(Zend_Controller_Response_Http), Array)\n#5 \/home\/www\/entouraxyz-dev.sector3gamez.com\/site_prod\/_library\/Zend\/Controller\/Front.php(945): Zend_Controller_Dispatcher_Standard-&gt;dispatch(Object(Zend_Controller_Request_Http), Object(Zend_Controller_Response_Http))\n#6 \/home\/www\/entourxyz-dev.sector3gamez.com\/site_prod\/_library\/Zcms\/Application.php(226): Zend_Controller_Front-&gt;dispatch()\n#7 \/home\/www\/entourxyz-dev.sector3gamez.com\/site_prod\/index.php(38): Zcms_Application::run('MainPlugin')\n#8 {main}\n<\/code><\/pre>\n<p>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.<\/p>\n<ol>\n<li>\n<p>I have found that the Facebook API will shut you out for a day or so (not tested how long exactly) when you&#8217;ve been testing your app and been sending a lot of invalid (?) requests.<\/p>\n<p>Wait a while and it will likely work again. The reason it happens on one server only will likely be the IP address.<\/p>\n<p>All of this is speculated since Facebook won&#8217;t specify anything regarding limitation or blocking, for security reasons.<\/p>\n<\/li>\n<\/ol>\n<p id=\"rop\"><small>Originally posted 2013-11-09 23:06:38. <\/small><\/p>","protected":false},"excerpt":{"rendered":"<p>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. [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1,8],"tags":[],"class_list":["post-958","post","type-post","status-publish","format-standard","hentry","category-uncategorized","category-zend-framework"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/958","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=958"}],"version-history":[{"count":1,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/958\/revisions"}],"predecessor-version":[{"id":8916,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/958\/revisions\/8916"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=958"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=958"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=958"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}