“需要指定一个有效的用户..."使用getCount时发生错误 [英] "Requires a valid user is specified ..." error when using getCount

查看:62
本文介绍了“需要指定一个有效的用户..."使用getCount时发生错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试从测试控制台使用getCount

当我输入安装我的应用程序的用户的uid(使用基本权限和publish_stream权限)时,出现以下错误:

When I enter a uid of a user that has installed my application (using basic and publish_stream permissions) I get the following error:

{
  "error_code": 240,
  "error_msg": "Requires a valid user is specified (either via the session or via the API parameter for specifying the user.",
  "request_args": [
    {
      "key": "uid",
      "value": "REMOVED_USER_ID"
    },
    {
      "key": "method",
      "value": "dashboard.getCount"
    },
    {
      "key": "access_token",
      "value": "REMOVED_ACCESS_TOKEN"
    },
    {
      "key": "format",
      "value": "json"
    }
  ]
}

任何想法为什么会这样?我该如何解决?我需要一些额外的权限吗?

Any ideas why is this happenning? How can I fix it? Do I need some extra permissions?

推荐答案

John,您不需要额外的权限.问题出在您的访问令牌上.该工具使用它的访问令牌是您的个人 用户 访问令牌,并且仅适用于您的uid.如果您使用 application 访问令牌(表示APP_ID | APP_SECRET),则可以为应用程序的所有用户查看此方法的结果.

John, you don't need extra permissions. The problem is with your access token. The access token that the tool uses it your personal user access token and will only work for your uid. If you use the application access token (meaning APP_ID|APP_SECRET) then you will be able to see the result of this method for all users of your application.

api.facebook.com/method/dashboard.getCount?uid= [UID] & access_token = [appid | appsecret] & format = json

api.facebook.com/method/dashboard.getCount?uid=[UID]&access_token=[appid|appsecret]&format=json

这篇关于“需要指定一个有效的用户..."使用getCount时发生错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆