次の方法で Firebase Facebook ログインを使用しようとしています。
これを私のHTMLに追加しました(テスト用):
<div
class="fb-like"
data-share="true"
data-width="450"
data-show-faces="true">
</div>
およびfirebaseスクリプト:
<script src="https://cdn.firebase.com/js/client/2.2.5/firebase.js"></script>
これは私のモジュールで:
var app = angular.module('myApp' ['firebase']);
そして、私のコントローラー内:
controller('yokoAppCtrl', function($scope, $firebaseObject, $firebaseAuth, wordsFactory){
var ref = new Firebase("https://resplendent-fire-4284.firebaseio.com/data");
// download the data into a local object
var syncObject = $firebaseObject(ref);
// synchronize the object with a three-way data binding
// click on `index.html` above to see it used in the DOM!
syncObject.$bindTo($scope, "data");
// create an instance of the authentication service
var auth = $firebaseAuth(ref);
// login with Facebook
auth.$authWithOAuthPopup("facebook").then(function(authData) {
console.log("Logged in as:", authData.uid);
}).catch(function(error) {
console.log("Authentication failed:", error);
});
})
ページをリロードするとlocalhost:8000、Facebook から次のメッセージが表示されます。
Given URL is not allowed by the Application configuration: One or more of the given URLs is not allowed by the App's settings. It must match the Website URL or Canvas URL, or the domain must be a subdomain of one of the App's domains.
Firebase docs とこのstackoverflow url: Facebook App: Firebase Simple Login URL errorに従いましたが、まだ迷っています。
アプリのサイト URL の下にhttp://localhost:8000/、ドメイン名の下にも含めようとしましlocalhost:8000たが、Facebook はそれを削除して"No Top-Level Domains allowed". これはすべて「基本」設定の下にあります。「高度な」の下に、次のものがありますValid OAuth redirect URIs。
https://auth.firebase.com/v2/<myFirebase>/auth/facebook/callback
http://localhost:8080/
https://auth.firebase.com/auth/facebook/callback
FirebaseでFacebook接続を既に有効にしています。私は何が欠けていますか?