“An access token is required to request this resource” while accessing an album / photo with Facebook php sdk

I am using the php sdk to access a user’s albums and photos in a website. I am able to login and also able to retrieve all the info about the albums and photos.

However, I am not able to display these photos on the webpage.

When I try the graph API, to get the photo / album like below:

https://graph.facebook.com/131833353530147/picture

I get the following error message:

{
   "error": {
      "type": "OAuthException",
      "message": "An access token is required to request this resource."
   }
}

But the same is working in while I try to display my profile pic and I do have a valid access token.

Help on this would be greatly appreciated.

Leave a Comment