Reputation: 21
I tried https://graph.facebook.com/username/picture?type=square .but I got this error
{
"error": {
"message": "(#803) Cannot query users by their username (user.name)",
"type": "OAuthException",
"code": 803
}
}
Upvotes: 2
Views: 1198
Reputation: 73984
As the error message tells you, it´s not possible to use the username for that anymore. You can only get the profile picture of a user after authorizing him with basic permissions and using his (App Scoped) ID:
https://graph.facebook.com/[app-scoped-id]/picture?type=square
In general, it is not possible to get any user details (or his picture) without authorizing, for privacy reasons. Check out the changelog for more information about the privacy changes: https://developers.facebook.com/docs/apps/changelog#v2_0
Don´t use tools like "findmyfbid", because they are scraping the ID from the user profile, which is not allowed. Also, you will only get the "global" ID that way, and you are not supposed to use that one either.
Upvotes: 3
Reputation: 21
You should grants all permission then fire URL again see what results comes.
Upvotes: -3
Reputation: 189
You Need to Put the User Id Instead of name
Like
https://graph.facebook.com/669515255/picture?type=square
Upvotes: 1