【问题标题】:Getting the crash Tried accessing nonexisting field (context) on node type (User) in android发生崩溃尝试访问android中节点类型(用户)上不存在的字段(上下文)
【发布时间】: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 friends api 自 2018 年起已弃用(并已删除)。

标签: android facebook-graph-api


【解决方案1】:

截至 2018 年 4 月 23 日

共同的朋友
Mutual Friends API 不再可用。

https://developers.facebook.com/docs/graph-api/changelog/breaking-changes#4-23-2018_6

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2020-11-19
    • 2017-07-13
    • 2018-07-20
    • 1970-01-01
    • 2015-04-21
    • 1970-01-01
    • 2017-01-09
    • 2017-04-15
    相关资源
    最近更新 更多