![](/img/trans.png)
[英]Android Facebook SDK How to get all friends list who installed my app
[英]How can i get all facebook friends who is not using my app or not login through my app
目前我正在使用 facebook sdk 4.4,我想获取所有不使用我的应用程序的 facebook 好友列表。
我写了下面的代码:
GraphRequestBatch batch = new GraphRequestBatch(
GraphRequest.newMyFriendsRequest(token,
new GraphRequest.GraphJSONArrayCallback() {
@Override
public void onCompleted(JSONArray jsonArray,
GraphResponse response) {
try {
//my code
}
} catch (JSONException e) {
e.printStackTrace();
}
}
}), GraphRequest.newMeRequest(token,
new GraphRequest.GraphJSONObjectCallback() {
@Override
public void onCompleted(JSONObject object,
GraphResponse response) {
System.out.println("meJSONObject: "
+ object);
System.out.println("meGraphResponse: "
+ response);
}
}));
batch.addCallback(new GraphRequestBatch.Callback() {
@Override
public void onBatchCompleted(GraphRequestBatch graphRequests) {
// Log.i(TAG, "onCompleted: graphRequests "+ graphRequests);
}
});
batch.executeAndWait();
从上面的代码中,它给了我正在使用我的应用程序的朋友列表。
但我想要不使用我的应用程序或未通过我的应用程序登录的朋友列表。
我怎样才能做到这一点?
从新图表开始,只能得到也使用该应用程序的朋友
https://developers.facebook.com/docs/graph-api/reference/v2.4/user/friends
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.