Naresh
Naresh

Reputation: 2781

Get more user info using facebook graph http method

i am using facebook Graph ApI to fetch user information from facebook. when i put this url https://graph.facebook.com/100002411409146….......... but it is showing limited information like this

{
"id": "100000824064682",
"name": "Bhupinder Bisht",
"picture": {
"data": {
"is_silhouette": false,
"url": "https://fbcdn-profile-a.akamaihd.net/…/11081203_86239149379…"
}
}
}

i want to get more information from facebook like his name,email and other social info etc. Is it possible to fetch user information from facebook using facebook graph Api or is there any issue with aceess token.

Upvotes: 0

Views: 45

Answers (1)

andyrandy
andyrandy

Reputation: 74004

Without user authorization, there is no way you can get any user data, you are not even supposed to get the name of the user:

  • That ID looks like a global ID. You can only get the global/real ID by scraping the user profile, which is not allowed on Facebook.
  • After authorization, you will get an "App Scoped ID", but you should always use /me to get user data.
  • Authorize the user with the correct permissions to get more data than just the name. For example, use the email permission to get the email: /me?fields=name,email
  • Without specific authorization of the user, you are not allowed to store or use his data in any way.

More information about user data: https://developers.facebook.com/docs/graph-api/reference/v2.6/user

Facebook Login: https://developers.facebook.com/docs/facebook-login/

Upvotes: 0

Related Questions