开发者

Facebook API achievements: #3404 Cannot find requested achievement when register a achievement

Here is the problem, when im trying to do what this post said, but when i register my achievement, i got an error:


    {
       "error": {
          "type": "OAuthException",
          "message": "(#3404) Cannot find requested achievement"
       }
    }

here is my python code to register the achievement:


    def register_achievement(url):
        from django.conf import se开发者_如何学Gottings
        app_access_token = get_app_access_token()
        post_data = {
            'achievement': url,
            'access_token': app_access_token,
            }
        file = urllib.urlopen("https://graph.facebook.com/" + settings.APP_ID + "/achievements", urllib.urlencode(post_data))
        try:
            response = _parse_json(file.read())
        finally:
            file.close()
        if type(response) == type({}) and response.get("error", None):
            raise GraphAPIError(response["error"]["type"],
                                response["error"]["message"])
        return response

and here is the link of the achievement: http://tapdiamond-nl-fb.socialgamenet.com/facebook/achievements/level_up/1


use this tool http://developers.facebook.com/tools/debug to debud this problem, and i found the reason is the app domain was empty in the app settings page.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜