1

Hi i am getting error like this

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

i set the 23594244327xxxx this key and run the application and post message to facebook. And after t 1531599148xxx this key and i got this error. please help me.

rmaddy
  • 314,917
  • 42
  • 532
  • 579
Hitendra
  • 1,610
  • 1
  • 15
  • 22
  • [Maybe This helps?](http://stackoverflow.com/questions/13496007/facebook-sdk-3-1-com-facebook-sdk-error-5-when-authenticating-with-facebook-a) – demonking May 08 '14 at 09:50

3 Answers3

7

Try to remove the application and build again

dr OX
  • 4,671
  • 1
  • 17
  • 9
1

Please make sure that the FacebookAppID is properly enterd in yourapp.info plist file. And check URL scheme set to fb(your fb app ID, no space after fb).

iAnurag
  • 9,286
  • 3
  • 31
  • 48
1

Here's how I fixed it:

  • Go to facebook's Graph API Explorer
  • Select your old application
  • Get User Access Token
  • Clear

This will fix the error, but you also might want to check this answer: ios facebook sdk 4.0 login error code 304