OAuthException 2500 (Unknown path components) when trying to register Achievement in Facebook

你说的曾经没有我的故事 提交于 2019-12-22 08:37:23

问题


I am trying to register a Facebook open graph achievement for an app. I obtain the app access token and post the following request using open graph API explorer:

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|pPwn52AvX-Pkj2n8Tavopew5Rav

(note that app ID an access token above are not the real ones). However, I get the following response:

{
  "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
  }
}

I have registered the app as a games type app and I have verified the achievement URL using open graph debugger (it shows the achievement and reports everything is fine). I also tried the above without the app-ID included in the access token. What could I be missing?


回答1:


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.



来源:https://stackoverflow.com/questions/16294449/oauthexception-2500-unknown-path-components-when-trying-to-register-achievemen

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!