2016-05-30 150 views
4

我已將帳戶套件sdk集成到我的項目中。Facebook帳戶工具包SDK提供無效的OAuth 2.0錯誤

我在facebook開發儀表板上創建了應用程序,啓用了它的Account Kit。得到app-id客戶端訪問令牌

我將它添加到info.plist文件中。我得到這個錯誤:

[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.}}} 

請幫助。謝謝

+0

你是否能夠發佈任何代碼,你在哪裏使用這個並獲取錯誤? – Brett

回答

2

確保您在info.plist中具有正確的設置。 我有一個類似的問題,在我的情況下,它缺少一個關鍵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> 
1

確保的AKFAccountKit比賽初始化響應類型與應用程序儀表板配置。 它可以是:

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

accountKit = [[AKFAccountKit alloc]initWithResponseType:AKFResponseTypeAuthorizationCode]; 
0

我得到這個錯誤時,我已經抄錯AccountKitClientToken到Info.plist中。在那裏找到了合適的人,現在一切都在進行中!

相關問題