使用Facebook的FriendPickerFragment找朋友相同的应用程序 [英] Using facebook's FriendPickerFragment to find friends with same app
问题描述
在Facebook的SDK新增了Facebook SDK 3.0为Android页,准备到使用原生UI视图它指出下: 朋友选择器让人们在一个开放式图形操作标记的朋友或找到谁安装的应用程序其他人。 这听起来非常有用,但FriendPickerFragment参考页面上有哪些方面的信息,在包ARG,包括获得额外的配置信息,没有信息。我工作的一个Android的游戏,我想允许用户启动游戏与其他用户谁也facebook的朋友,但无法弄清楚如何获得好友列表安装相同的应用程序。有谁知道什么参数(S)可以传递到FriendPickerFragment获得其他应用程序的用户列表?在此先感谢这么多,请让我知道如果需要更多的信息,以使这个问题更加相关/更有意义。
friendPickerFragment.setFilter(新GraphObjectFilter< GraphUser>(){
@覆盖
公共布尔includeItem(GraphUser graphObject){
如果(graphObject.asMap()的containsKey(安装)及。&安培;(布尔)graphObject.asMap()获得(安装))
返回false;
其他{
返回true;
}
}
});
On the facebook SDK "What’s New in Facebook SDK 3.0 for Android" page, under "Ready-to-Use native UI views" it states: "Friend Picker lets people tag friends in an Open Graph action or find other people who installed your app." This sounds very useful, but on the FriendPickerFragment reference page there is no information regarding what information to include in the Bundle arg to get additional configuration information. I'm working on an Android game and I want to allow users to start a game with other USERS who are also facebook friends, but can't figure out how to get a list of friends with the same app installed. Does anyone know what argument(s) can be passed into FriendPickerFragment to get a list of other app users? Thanks so much in advance, please let me know if more information is required to make this question more relevant/make more sense.
friendPickerFragment.setFilter(new GraphObjectFilter<GraphUser>() {
@Override
public boolean includeItem(GraphUser graphObject) {
if(graphObject.asMap().containsKey("installed") && (Boolean) graphObject.asMap().get("installed"))
return false;
else{
return true;
}
}
});
这篇关于使用Facebook的FriendPickerFragment找朋友相同的应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!