Warm tip: This article is reproduced from stackoverflow.com, please click
facebook-graph-api

Why do profile pic URLs returned from graph.facebook result in a 404

发布于 2020-03-27 10:22:57

The backend of my application makes a request to:
https://graph.facebook.com/v2.8/me?access_token=<firebase-access-token>&fields=id,name,first_name,birthday,email,picture.type(large){url}&format=json&method=get&pretty=0&suppress_http_code=1

I get a successful (200) response with the JSON data I expect and picture field as such:

"picture": {
    "data": {
        "url": "https://platform-lookaside.fbsbx.com/platform/profilepic/?asid=<asid>&height=200&width=200&ext=<ext>&hash=<hash>"
    }
}

(where in place of <asid> and <ext>, there are numbers and <hash> is some alphanumeric string).

However, when I make a GET request to the platform-lookaside URL above, I get a 404 error.

It's been happening every time since my very first graph.facebook request for the same user. The very first one returned a platform-lookaside URL which pointed to a proper image (not sure if this is simply coincidence).

Is there something I'm doing wrong or is this likely a bug with the Facebook API?

Questioner
Ash
Viewed
77
lars.schwarz 2019-07-03 23:32

FB currently seems to have issues with some CDNs and therefore your issue might be only temporary. You should also see missing/broken images on some places on fb dot com. Worst time to debug your issue :)