用Facebook API登录 [英] Login with Facebook API
本文介绍了用Facebook API登录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
当用户登录返回身份验证令牌时,我已经成功使用Facebook API创建了登录.但是,如何从Facebook API获取用户详细信息?为了登录用户名等详细信息,我必须对Facebook API进行哪种查询?
I have successfully created login with Facebook API, when user logins auth token is returned. But how can I get user details from Facebook API? What kind of query I have to make to Facebook API to get logged in users name etc. details ?
推荐答案
只需使用'me'表示已登录的用户,并使用access_token访问所有允许的资源,例如:
Simply use 'me' to denote the logged in user and use the access_token to access all permitted resources like:
https://graph.facebook.com/me?access_token=...
您还可以使用以下命令访问所有允许的字段:
Also you can access all permitted fields using below:
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=...
完整信息在这里: http://developers.facebook.com/docs/reference/api/
这篇关于用Facebook API登录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文