8

我正在尝试为某个应用注册 Facebook 开放图表成就。我获取应用访问令牌并使用开放图形 API 资源管理器发布以下请求:

https://graph.facebook.com/752901688356092/achievements&achievement=https://googledrive.com/host/0B1R_JKMKJc2KbkNqZTdleEZvOUE/brags/fb_achive_100_words.html&display_order=100&access_token=752901688356092|pPwn52AvXRavTavope2

(请注意,上面的应用程序 ID 和访问令牌不是真实的)。但是,我得到以下响应:

{
  "error": {
    "message": "Unknown path components: /achievements&achievement=https://googledrive.com/host/0B1R_JKMKJc2KbkNqZTdleEZvOUE/brags/fb_achive_100_words.html&display_order=100&access_token=752901688356092|pPwn52AvX-Pkj2n8Tavopew5Rav",
    "type": "OAuthException",
    "code": 2500
  }
}

我已将该应用程序注册为游戏类型应用程序,并使用开放图形调试器验证了成就 URL(它显示了成就并报告一切正常)。我也尝试了上面没有包含在访问令牌中的应用程序 ID。我会错过什么?

4

1 回答 1

11

You have an error in the way your URL is composed. The first GET parameter is supposed to be separated from the base URL by a ?, not a &. Try the following :

https://graph.facebook.com/752901688356092/achievements?achievement=https://googledrive.com/host/0B1R_JKMKJc2KbkNqZTdleEZvOUE/brags/fb_achive_100_words.html&display_order=100&access_token=752901688356092%7CpPwn52AvX-Pkj2n8Tavopew5Rav

This throws another error, but that might also be caused by a missing AUTH token. Why don't you have a look at how they suggest you do it? You probably need to check the setup of the achievement.

于 2013-04-30T07:50:23.437 回答