![](/img/trans.png)
[英]How to get a list of friend's Facebook ID's from Graph API on Android?
[英]how to get facebook friend list with emails through new graph api, v2.5?
我正在嘗試使用下面的代碼獲取朋友列表
GraphRequest request = GraphRequest.newMyFriendsRequest(
token,
new GraphRequest.GraphJSONArrayCallback() {
@Override
public void onCompleted(JSONArray array, GraphResponse response) {
// Insert your code here
}
});
request.executeAsync();
}
執行代碼后返回的響應是
{Response: responseCode: 200, graphObject: {"data":[],"summary":{"total_count":461}}, error: null}
登錄時間允許access friends
和public profile
。 我如何獲取朋友列表和他們的公共電子郵件/ Facebook電子郵件?
您只會收到也在使用您的應用程序的朋友,請參閱
/me/friends
返回也在使用您的應用程序的用戶朋友。在v2.0中,friends API端點返回也在使用您的應用程序的個人朋友的列表。 在v1.0中,響應包括一個人的所有朋友。
而且, 沒有 ,如果您要詢問,也沒有解決方法。
您可以使用graph-api調用獲取好友列表
/* make the API call */
new GraphRequest(
AccessToken.getCurrentAccessToken(),
"/me/friends",
null,
HttpMethod.GET,
new GraphRequest.Callback() {
public void onCompleted(GraphResponse response) {
/* handle the result */
}
}
).executeAsync();
但是限制是
。 https://developers.facebook.com/docs/graph-api/reference/v2.5/user/friends
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.