skip to Main Content

When trying to access user profile picture from Facebook graph API or JavaScript SDK, the url for picture is returned, but the URL does not resolve to a picture when requested.

The JavaScript SDK returns 404 error, [Link] enter image description here

Note: Yes these profile has a profile picture, I tried with multiple user accounts. (My FaceBook application is not live yet, but all the profiles are added as tester / developer accounts in App roles. So at least I should get a silhouette profile picture according to the limitations mentioned here.

These are the things I tried.

Solutions Tried 01

FB.api(
  '/me',
  { fields: 'id,name,email,picture' },
  (response: { name: string; id: string }) => {
    console.info(response);
  }
);

This API call resolves to a URL like https://z-p3-graph.facebook.com/v18.0/me?access_token= and the response has the picture URL, which doesn’t work.

{
    "id": "122098927370045754",
    "name": "John Doe",
    "email": "[email protected]",
    "picture": {
        "data": {
            "height": 50,
            "is_silhouette": false,
            "url": "https://platform-lookaside.fbsbx.com/platform/profilepic/?asid=122098927370045754&height=50&width=50&ext=1702101647&hash=AeQk6_WB4RtEAIyWrwI",
            "width": 50
        }
    }
}

Solutions Tried 02

Another way I found on SO was to call the graph.acebook.com directly with access token.

https://graph.facebook.com/122098927370045754?fields=picture.width(720).height(720)&redirect=false&access_token=

Which also gives a URL, but doesn’t work.

{
    "picture": {
        "data": {
            "height": 200,
            "is_silhouette": false,
            "url": "https://platform-lookaside.fbsbx.com/platform/profilepic/?asid=122098927370045754&height=720&width=720&ext=1702102119&hash=AeQAsmiIwfIfV9vgQ-Y",
            "width": 200
        }
    },
    "id": "122098927370045754"
}

Tried Solution 03

URLs like https://graph.facebook.com/{facebookId}/picture?type=large, as mentioned here only return a silhouette picture, which is understandable because now we need an access token to access these.

But with access token, according to the docs,

https://graph.facebook.com/122098927370045754/picture?type=large&access_token=

It returns the same https://platform-lookaside.fbsbx.com/ URL, which is Not Found.

Am I missing something here? Or It’s an issue with FaceBook API itself? Any help would be appreciated.

Edit: Found this thread over at Meta Developers. Still not resolved though. https://developers.facebook.com/community/threads/292690177015780/

2

Answers


  1. Unfortunately this isn’t an answer, as I can’t add a comment. I wanted to ask if you or anyone else has any news about the issue. There is no update in the thread you posted yet.

    Login or Signup to reply.
  2. I am experiencing same issue also…

    https://graph.facebook.com/XXXXXXXXXXXXXXXXXXX/picture?access_token=3414634551R5082Z|AxC8DDasJG74A25GGVLhS5FFU1A0&width=256&height=256

    The result :

    This platform-lookaside.fbsbx.com page can’t be foundNo webpage was found for the web address: https://platform-lookaside.fbsbx.com/platform/profilepic/?asid=XXXXXXXXXXXXXXXXXXX&height=256&width=256&ext=1703417058&hash=AeQEn1sJm0lQY1fRBVs

    Any idea ?

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search