【问题标题】:Facebook open graph get 'me' works but 'me?fields=name' returns oAuth errorFacebook open graph get 'me' works 但 'me?fields=name' 返回 oAuth 错误
【发布时间】:2012-08-28 01:53:24
【问题描述】:

看完长标题,下面是我目前的状态:

  1. 我已成功登录 Facebook(Authorize 方法返回完成)。
  2. 我实施了一个异步任务来获取“me”数据 - 一切正常。
  3. 我尝试将呼叫更改为 me?fields=namegender,但收到类似 -
    "An active access token must be used to query information about the current user."
  4. 的错误

我尝试用谷歌搜索它并阅读它,但因为人们用数百万种语言实现他们的代码,我没能找到解决我问题的好方法。

请指教! 盎司

【问题讨论】:

    标签: java android facebook facebook-graph-api oauth


    【解决方案1】:

    为了解决这个问题,我改变了处理 facebook 对象的方式: 而不是发送它me?fields=name,gender

    我改成了这段代码:

            Bundle bundle = new Bundle();
            bundle.putString("fields", "name, gender, picture");
            String jsonString = params[0].request("me", bundle);
    

    【讨论】:

      猜你喜欢
      • 2018-10-02
      • 2015-07-24
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多