Facebook account SDK gives invalid OAuth 2.0 error

My project integrates a set of sdk accounts .

I created an application in the facebook control panel by including a set of accounts in it. Got the app-id and client access token .

I added it to the info.plist file . I get this error:

[AccountKit][Error]: Invalid OAuth 2.0 Access Token
2016-05-31 02:41:32.191 Chat[2919:563260] [AccountKit][Error]: 

Persisting App Events due to error: 

Error Domain=com.facebook.accountkit:Error Code=200 "(null)" 

UserInfo={com.facebook.accountkit:ErrorDeveloperMessageKey=Invalid OAuth access token., NSUnderlyingError=0x147596a30 

{Error Domain=com.facebook.accountkit:ServerError Code=190 "(null)" UserInfo={com.facebook.accountkit:ErrorDeveloperMessageKey=Invalid OAuth access token.}}}

Please, help. Thanks

+4
source share
4 answers

Make sure you have the correct settings in the info.plist file. I had a similar problem and in my case the FacebookAppID key was missing

<key>FacebookAppID</key>
<string>{your-app-id}</string> 
<key>AccountKitClientToken</key>
<string>{your-account-kit-client-token}</string>
<key>CFBundleURLTypes</key>
<array>
     <dict>
         <key>CFBundleURLSchemes</key>
         <array>
             <string>ak{your-app-id}</string>
         </array>
     </dict>
</array>
+3
source

, AKFAccountKit . :

accountKit = [[AKFAccountKit alloc] initWithResponseType:AKFResponseTypeAccessToken];

accountKit = [[AKFAccountKit alloc]initWithResponseType:AKFResponseTypeAuthorizationCode];
+1

This may be a problem with your configuration. You can file a bug report using Facebook here, including token information: https://developers.facebook.com/bugs/

0
source

I got this error when I copied the wrong AccountKitClientToken account in Info.plist. There was the right one and everything is working now!

0
source

All Articles