{"id":1453,"date":"2022-08-30T15:16:39","date_gmt":"2022-08-30T15:16:39","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2013\/11\/19\/facebook-php-sdk-throwing-unauthorized-source-ip-address-error-collection-of-common-programming-errors\/"},"modified":"2022-08-30T15:16:39","modified_gmt":"2022-08-30T15:16:39","slug":"facebook-php-sdk-throwing-unauthorized-source-ip-address-error-collection-of-common-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2022\/08\/30\/facebook-php-sdk-throwing-unauthorized-source-ip-address-error-collection-of-common-programming-errors\/","title":{"rendered":"Facebook PHP SDK throwing Unauthorized source IP address error-Collection of common programming errors"},"content":{"rendered":"<p>I recently discovered that one of our production servers is giving a fatal error when we try to issue an FQL query via the Graph API. The exact same code on other servers works perfectly. The servers are behind a load balancer with a single IP address.<\/p>\n<p>The error is:<\/p>\n<pre><code>  PHP Fatal error:  Uncaught OAuthException: (#5) Unauthorized source IP address\n  thrown in \/usr\/local\/home\/faniq\/php-lib\/facebook\/base_facebook.php on line 1039\n<\/code><\/pre>\n<p>I have tried adding the IP address to my FB app&#8217;s server whitelist (which was blank). When I try to save the whitelist, it gives me this error: Your IP should be included in the Server Whitelist.<\/p>\n<p>I even tried a range of IP addresses, still refuses to save. The other production servers and our development environments all work fine, so I am at a loss. Any ideas why Facebook would not accept requests from this one particular server?<\/p>\n<p id=\"rop\"><small>Originally posted 2013-11-19 13:17:25. <\/small><\/p>","protected":false},"excerpt":{"rendered":"<p>I recently discovered that one of our production servers is giving a fatal error when we try to issue an FQL query via the Graph API. The exact same code on other servers works perfectly. The servers are behind a load balancer with a single IP address. The error is: PHP Fatal error: Uncaught OAuthException: [&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],"tags":[],"class_list":["post-1453","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/1453","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=1453"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/1453\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=1453"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=1453"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=1453"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}