开发者

All the facebook uid on my application

开发者 https://www.devze.com 2023-03-17 17:52 出处:网络
I have an application associated with Facebook. When I say associated, I mean that the users gave me the permissions on the email and I store their uid in my database.

I have an application associated with Facebook. When I say associated, I mean that the users gave me the permissions on the email and I store their uid in my database. What I want to do now, is to show them all their facebook friends that are in my application too. Moreover, if an user is visiting a profile of a friend of a friend's Facebook (second level) I would like to not开发者_如何转开发ify this in my application. In order to do this, I need to be able to retrieve all the friends' uid of my users. Does exist a GraphAPI function that gives me all the Friend uid connected to my app?


UPDATE: You can get it with the REST API Facebook 'Friends.getAppUsers' using Graph API

You can only get the friends of a user who has given you permission to gather their friends. For example if you are logged in and go here, you should see all of your friends.

https://graph.facebook.com/me/friends?your|tokens|here**

If you try to look up the friends of another user though you get an error message

"Can't lookup all friends of 555555. Can only lookup for the logged in user (515151), or friends of the logged in user with the appropriate permission"

See the User object developer docs.

**If you click on the links in here while logged into facebook it will automatically add in your appropriate tokens.

0

精彩评论

暂无评论...
验证码 换一张
取 消