Facebook App id错误

时间:2014-05-08 09:48:00

标签: ios facebook-graph-api

嗨我收到这样的错误

FBSDKLog: Error Domain=com.facebook.sdk Code=5 "The operation couldn’t be completed. (com.facebook.sdk error 5.)" UserInfo=0xe397590 {com.facebook.sdk:HTTPStatusCode=400, com.facebook.sdk:ParsedJSONResponseKey={
    body =     {
        error =         {
            code = 100;
            message = "(#100) Graph API for app id 1531599148xxx called, but token has app id 23594244327xxxx";
            type = OAuthException;
        };
    };
    code = 400;
}, com.facebook.sdk:ErrorSessionKey=<FBSession: 0x11ced060, state: FBSessionStateCreatedTokenLoaded, loginHandler: 0x0, appID: 153159914890587, urlSchemeSuffix: , tokenCachingStrategy:<FBSessionTokenCachingStrategy: 0x11cec500>, expirationDate: 2014-07-07 07:49:25 +0000, refreshDate: 2014-05-08 07:49:25 +0000, attemptedRefreshDate: 0001-12-30 00:00:00 +0000, permissions:(
    "create_note",
    "basic_info",
    "share_item",
    "status_update",
    "user_friends",
    "publish_actions",
    "publish_checkins",
    "video_upload",
    "publish_stream",
    "photo_upload",
    installed,
    "public_profile"
)>}

我将23594244327xxxx设置为此密钥并运行应用程序并将消息发布到Facebook。并且在t 1531599148xxx这个键之后我得到了这个错误。请帮帮我。

3 个答案:

答案 0 :(得分:6)

尝试删除该应用程序并重新构建

答案 1 :(得分:1)

请确保在yourapp.info plist文件中正确输入了FacebookAppID。并检查URL方案设置为fb(您的fb应用ID,fb后没有空格)。

答案 2 :(得分:0)

以下是我修复它的方法:

  • 转到facebook的Graph API Explorer
  • 选择旧应用程序
  • 获取用户访问令牌
  • 清除

这样可以解决错误,但您也可以查看以下答案:ios facebook sdk 4.0 login error code 304