0
votes

im using Go Daddy hosting...

IP Address 118.139.174.1 Dedicated IP Address 118.139.174.142

from last one month im getting this error from Facebook, i try to fill IP Address in App Setting, but still does not work...

Fatal error: Uncaught OAuthException: (#5) Unauthorized source IP address thrown in /home/content/88/9201788/html/stone-game/classes/facebook/base_facebook.php on line 1106

3
Can you add the code which you are using, you have an OAuthException - did you search for that yet? - Rob
im using this code. $facebook = new Facebook(array( 'appId' => '', 'secret' => '', )); $user = $facebook->getUser(); if ($user) { try { $user_profile = $facebook->api('/me'); } catch (FacebookApiException $e) { error_log($e); $user = null; } } with facebook php sdk 3.1 - Kamal Sharma

3 Answers

1
votes

Your outgoing IP address is different from your hosting address. I've ran into the exact same situation about a month ago. I've contacted GoDaddy and I was told that there's nothing to do for fixing the outgoing IP address unless I start using a [virtual] dedicated server. Just delete the whitelisted IP from the list and you'll be fine.

Here, have a look at this: OAuth Error: This IP can't make requests for that application

-1
votes

You might also be running the API from your Localhost. Try running your application live.