Facebook user profile pic no longer accessible?

Viewed 198

(I'm aware of this question, but it's outdated to the point of no longer working, so asking again.)

With the Facebook API it used to be that all profile pictures were considered public, and you could get one for anyone without any access tokens like this: https://graph.facebook.com/4/picture

Now in 2020 it seems that it only works for public images like Zuck there. I have a tool for Facebook page admins that shows a list of people who liked page posts, but when I try to show user pictures in the list they all now come up blank because "This object does not exist or does not support this action".

The docs now say "This document refers to a feature that was removed after Graph API v3.2". But I could not find any more information about this deprecation. Is it now just impossible to show the picture of a user without having a user access token, or has the way to call it just changed?

1 Answers

The feature has not been removed, but now for users that don't have their profiles set as public, you need to provide an access token.

For instance suppose you use the Page API to list all the people who commented on a post. Previously you could show the profile pics of commenters by just linking to https://graph.facebook.com/<UID>/picture. However now you need an access token for that Page, and to then access the pic as https://graph.facebook.com/<UID>/picture?access_token=<TOKEN HERE>.

I have not tested this with apps, but I would assume that also to get the profile pics of app users based on their app-scoped UID, you'd need to include an access token there as well.

Related