简体   繁体   English

Facebook IOS SDK找到所有朋友的ID

[英]Facebook IOS Sdk find all friends ids

I'm looking for doing a tableview which allow you to select one facebook friends and be able to send him a message to his wall later. 我正在寻找一张表格视图,允许您选择一个Facebook朋友,以后可以向他发送消息到他的墙上。 The thing is that i tried /me/friends but it returns only the friends which use the same app...and it's not really usefull then. 问题是我尝试了/ me / friends,但是它只返回使用同一应用程序的朋友...而那时它并没有真正的用处。

I also tried /me/taggable_friends but it returns me an id for tag the friend and doesn't work for sending a message... 我也尝试过/ me / taggable_friends,但是它返回给我一个标记该朋友的ID,并且无法发送消息...

The last one i didn't try is /me/invitable_friends since it's not a game...but i guess it's also using an id only for invitation... 我没有尝试的最后一个是/ me / invitable_friends,因为它不是游戏...但是我想它也仅将ID用于邀请...

So is there a way to get the list of all the friends of facebook and get there ids ? 那么,有没有一种方法可以获取Facebook所有朋友的列表并获得ID?

thanks ! 谢谢 !

That isn't supported anymore. 不再支持。 There doesn't appear to be a simple way to grab all of a user's friends. 似乎没有一种简单的方法来抓住用户的所有朋友。 You could use /user/invitablefriends , but that comes with a whole host of caveats. 您可以使用/user/invitablefriends ,但这带有很多警告。 From the docs: 从文档:

A list of friends that can be invited to install a Facebook game. 可以被邀请安装Facebook游戏的朋友列表。

The Invitable Friends API is only available to apps classified as Games, which also have a Canvas presence. Invitable Friends API仅适用于分类为“游戏”且也具有“画布”状态的应用。 This API is not available in v1.0. 该API在v1.0中不可用。 It may be called by mobile games as long as they also have a Canvas presence. 只要移动游戏也具有Canvas外观,就可以调用它。

The Invitable Friends API is only available to apps classified as Games, which also have a Canvas presence. Invitable Friends API仅适用于分类为“游戏”且也具有“画布”状态的应用。 This API is not available in v1.0. 该API在v1.0中不可用。 It may be called by mobile games as long as they also have a Canvas presence. 只要移动游戏也具有Canvas外观,就可以调用它。 Since Graph API v2.0, /me/friends returns a person's friends who also use the app. 从Graph API v2.0开始,/ me / friends返回也使用该应用程序的人的朋友。 You may use the Requests Dialog to invite people to play a game. 您可以使用“请求对话框”邀请其他人玩游戏。 However, if you want to build a custom multi-friend selector within your game, you need to use call /me/invitable_friends which returns a ranked list of a person's friends who do not play the game, along with a token which can be passed to the Request Dialog in order to invite them. 但是,如果您要在游戏中构建自定义的多好友选择器,则需要使用呼叫/ me / invitable_friends,该呼叫返回不玩游戏的某人的好友的排名列表,以及可以传递的令牌到“请求对话框”以邀请他们。 Read our guide on using the Invitable Friends API. 阅读有关使用Invitable Friends API的指南。

Additionally, posting to another user's wall cannot be done through the Facebook SDK anymore. 此外,再也无法通过Facebook SDK将其发布到其他用户的墙上。 You can post to your own wall and you can tag other users, but you can't post directly to their wall anymore. 您可以发布到自己的墙上,也可以标记其他用户,但不能再直接发布到他们的墙上。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM