2016-12-02 7 views
4

現在、ReachネイティブアプリケーションのFacebook認証を設定しています。 react-native-fbsdk設定の通常の問題の後で、Facebook App Eventsが動作し、LoginManagerがロードされます。FB SDKエラー:ログインに失敗しました(反応ネイティブ)

私の問題:認証LoginManagerが戻ってアプリに私をリダイレクトした後で、私はエラーを示しています

Login Failed

私は非常に標準LoginManager実装を使用しています:

const FBSDK = require('react-native-fbsdk'); 
const { 
    LoginManager, 
    AccessToken, 
} = FBSDK; 


export default class FacebookAuth extends Component { 

    facebook(){ 
    LoginManager.logInWithReadPermissions(['public_profile', 'email']).then(
    function(result) { 
    if (result.isCancelled) { 
     alert('Login cancelled'); 
    } else { 
     alert('Login success with permissions: ' 
     +result.grantedPermissions.toString()); 
    } 
    }, 
    function(error) { 
    alert('Login fail with error: ' + error); 
    } 
); 

はあなたを行います私のための任意のポインタがありますか?

私はすでに確認:FacebookのAppで

  • のInfo.plistのiOSバンドルID
  • クライアントのOAuth設定
  • FBSDK LoginButton(同じエラー)
    • FBアプリ情報を

      実行中:iOS 10 &反応ネイティブ0.38.0。

      ありがとうございます!

    答えて

    0

    私はこの問題を解決したと思います。 私はまだ100%の理由を明らかにしていませんが、これに関連しています。 How to use Facebook iOS SDK on iOS 10

    キーチェーンアクセスを有効にすると、認証が機能します。

    7

    Error when login with Facebook SDK — React Native

    The problem was that Facebook SDK was still keeping the previous session token, and when I was trying to login again I was getting this error, to solve this problem all I had to do was to call the logOut method from the LoginManager.

    LoginManager.logInWithReadPermissions...

    LoginManager.logOut(); 
    
    前にこれにしてみてください
    関連する問題