Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add picture field to facebook #150

Closed
wants to merge 1 commit into from

Conversation

mtibben
Copy link
Contributor

@mtibben mtibben commented Apr 10, 2023

Add the picture field to facebook user in order to get the avatar

@dghubble
Copy link
Owner

Can you please provide more motivating info:

  • Can you provide docs links?
  • Does this require extra permissions scope?
  • What min API provides the picture URL?
  • What's an example structure for that URL?
  • Have you tested this?
  • Why should this be part of every login, instead of users using the access token directly?

@mtibben
Copy link
Contributor Author

mtibben commented Apr 24, 2023

  • Can you provide docs links?
  • Does this require extra permissions scope?

No it does not not. The existing public_profile scope allows access to this field.

  • What min API provides the picture URL?

Unknown as Facebook's API docs do not go back that far. I would assume that this field is present in every API, as a profile picture feature seems to be a core feature of a social network. I could update the base url to a more recent version, however I typically don't like to change any more than a feature requires. What would your preference be?

  • What's an example structure for that URL?

See https://developers.facebook.com/docs/graph-api/overview which provides the following example

{
  "id": "USER-ID",
  "name": "EXAMPLE NAME",
  "email": "[email protected]",
  "picture": {
    "data": {
      "height": 50,
      "is_silhouette": false,
      "url": "URL-FOR-USER-PROFILE-PICTURE",
      "width": 50
    }
  }
}
  • Have you tested this?

Yes, I have. It is working successfully

  • Why should this be part of every login, instead of users using the access token directly?
  • this is extremely common data required at login, often more important than data like "name" because the avatar is shown immediately to the user to indicate the logged in state
  • Feature parity with the google callback handler

@dghubble
Copy link
Owner

Thanks for that, merged as 113f452

@dghubble dghubble closed this Apr 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants