【发布时间】:2019-12-09 17:30:05
【问题描述】:
突然间,我在运行生产代码的这段代码上遇到了崩溃。可能是什么原因造成的
我正在使用 Facebook 图形 api
com.facebook.android:facebook-android-sdk:[4,5)
我遇到崩溃的代码
Bundle params = new Bundle();
params.putString("fields", "context.fields(mutual_friends)");
new GraphRequest(AccessToken.getCurrentAccessToken(), "/" + userProfileInfoModel.getFacebookId(), params, HttpMethod.GET,
new GraphRequest.Callback() {
public void onCompleted(GraphResponse response) {
facebookFriendsTagId.setText("");
fbFriendsApiCallForOtherFriends(response);
}
}
).executeAsync();
错误:
{Response:
responseCode: 400,
graphObject: null,
error: {
HttpStatus: 400,
errorCode: 100,
subErrorCode: -1,
errorType: OAuthException,
errorMessage: (#100) Tried accessing nonexisting field (context) on node type (User)}}
【问题讨论】:
-
你检查过this吗?
-
mutual friendsapi 自 2018 年起已弃用(并已删除)。
标签: android facebook-graph-api