2016-04-12 7 views
0

コードブラウザアプリ内ブラウザプラグインを使用して、CordovaアプリでソーシャルFacebookログイン(firebaseで管理)を実装しようとしています。私のデバイス(iOS)にログインしようとすると、アプリ内ブラウザがFacebookのログイン情報を正しく表示しますが、Facebookのエラーが表示されます:CordovaでFirebase経由でFacebookにログインできるようにする

"指定されたURLはアプリケーション設定で許可されていません:は、ウェブサイトのURLまたはCanvas URLと一致する必要があります。または、ドメインは、アプリケーションのドメインの1つのサブドメインである必要があります。

これまでにこのエラーが発生しましたが、私のFacebookアプリにアクセスするためにドメインをホワイトリストに登録する必要があることがわかっています。モバイルでコードバスアプリからリクエストが来た場合はどうすればよいですか?デバイス?

私はcordova Facebookプラグインを使用することを提案した他の投稿を閲覧しましたが、これはアプリに直接ログインし、ユーザーがFirebaseにログインしていることを登録しませんユーザー管理)。

どのような考えですか?

ありがとうございました!

 var login = function(provider) { 
ref.authWithOAuthPopup(provider, function(error, authData) { 
    if (error) { 
    // an error occurred while attempting login 
console.log(JSON.stringify(error)); 
    } else { 
    // user authenticated with Firebase 
    // var message = 'User ID: ' + authData.uid + ', Provider: ' + authData.provider; 
    } 
}); 

}

答えて

0

ハイファイブドキュメントを読んで、私自身の答えを見つけるために:ここで

はコードです。

から:https://www.firebase.com/docs/web/guide/login/facebook.html#section-configure

In your Facebook app configuration, click on the Settings tab on the left-hand navigation menu. Then go to the Advanced tab at the top and scroll down to the Client OAuth Settings section. At the bottom of that section, add https://auth.firebase.com/v2/(YOUR-FIREBASE-APP)/auth/facebook/callback to your Valid OAuth redirect URIs and click Save Changes at the bottom of the page.

関連する問題