当用户登录auth令牌返回时,我已成功使用Facebook API创建登录。但是如何从Facebook API获取用户详细信息?我必须对Facebook API进行哪种查询才能登录用户名等详细信息?
答案 0 :(得分:1)
只需使用“我”来表示登录用户,并使用access_token访问所有允许的资源,例如:
https://graph.facebook.com/me?access_token=...
您还可以使用以下方式访问所有允许的字段:
Friends: https://graph.facebook.com/me/friends?access_token=...
News feed: https://graph.facebook.com/me/home?access_token=...
Profile feed (Wall): https://graph.facebook.com/me/feed?access_token=...
Likes: https://graph.facebook.com/me/likes?access_token=...
Movies: https://graph.facebook.com/me/movies?access_token=...
Music: https://graph.facebook.com/me/music?access_token=...
Books: https://graph.facebook.com/me/books?access_token=...
Notes: https://graph.facebook.com/me/notes?access_token=...
Permissions: https://graph.facebook.com/me/permissions?access_token=...
Photo Tags: https://graph.facebook.com/me/photos?access_token=...
Photo Albums: https://graph.facebook.com/me/albums?access_token=...
Video Tags: https://graph.facebook.com/me/videos?access_token=...
Video Uploads: https://graph.facebook.com/me/videos/uploaded?access_token=...
Events: https://graph.facebook.com/me/events?access_token=...
Groups: https://graph.facebook.com/me/groups?access_token=...
Checkins: https://graph.facebook.com/me/checkins?access_token=...