gpt4 book ai didi

android - Facebook Android SDK : get mutual friends

转载 作者:搜寻专家 更新时间:2023-11-01 09:00:28 25 4
gpt4 key购买 nike

我正在尝试使用 Android SDK 获取两个 Facebook 用户的共同好友:

Request friendsInCommon = Request.newRestRequest(myFbSession, "me/mutualfriends/otherUserId", null, HttpMethod.GET);

然而,这会返回以下错误:

03-16 04:24:39.652: D/ViewProfile(27121): My friends list: {Response:  responseCode: 200, graphObject: null, error: {HttpStatus: 200, errorCode: 3, errorType: null, errorMessage: Unknown method}, isFromCache:false}

关于我做错了什么的任何线索?

谢谢

最佳答案

如果有人感兴趣,我最终通过将请求视为图形 API 请求来解决这个问题:

Bundle params = new Bundle();
params.putString("fields", "id,name,picture");
Request req = new Request(myFbSession, "me/mutualfriends/otherUserId", params, HttpMethod.GET, new Callback(){
@Override
public void onCompleted(Response response) {
// your callback code
}
});
req.executeAsync();

关于android - Facebook Android SDK : get mutual friends,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15445600/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com