Reputation: 71
I have integrated Account kit sdk in to my project.
I created the application on facebook development dashboard, enabled Account Kit on it. Got app-id and client access token.
I added it into info.plist file. I am getting 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 need help. Thanks
Upvotes: 4
Views: 3683
Reputation: 2662
You can add your client token using AKFSettings.setClientToken("MY TOKEN")
and make sure to import AccountKit
at the top of the file where you call this.
Upvotes: 0
Reputation: 1782
I got this error when I had copied the wrong AccountKitClientToken into the Info.plist. Got the right one in there and everything is working now!
Upvotes: 0
Reputation: 2268
Make sure that initialization response type of AKFAccountKit
matches with your application dashboard configuration.
It can be:
accountKit = [[AKFAccountKit alloc] initWithResponseType:AKFResponseTypeAccessToken];
or
accountKit = [[AKFAccountKit alloc]initWithResponseType:AKFResponseTypeAuthorizationCode];
Upvotes: 1
Reputation: 51
Make sure you have the correct settings in info.plist. I had a similar problem and in my case it was missing a key FacebookAppID
<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>
Upvotes: 5
Reputation: 361
This might be an issue with your configuration. You can file a bug report with Facebook here including your token information: https://developers.facebook.com/bugs/
Upvotes: 0