Facebook – Uncaught OAuthException FaceBook PHP SDK

facebookfacebook-fqlfacebook-graph-api

I copied the whole of the example.php in the Facebook php sdk at the exmaples folder to another php file and i got this error:
Fatal error: Uncaught OAuthException: Invalid OAuth access token signature. thrown in C:\wamp\www\facebook-php-sdk-4ea94b9\src\base_facebook.php on line 1039 .

When i comment this line: $naitik = $facebook->api('/naitik'); . Everything seems to be quite fine except this error: Notice: Undefined variable: naitik in C:\wamp\www\facebook-php-sdk-4ea94b9\examples\newExample.php on line 100 . Which is expected. What could be the problem?

Best Answer

You probably are not following the authentication process correctly. Ensure your app id and secret key are correct. Make sure you're running your app from the domain you specified in your app settings on facebook.

Related Topic