私は、角度UIルータのWebアプリケーションを持っています。私は、ログイン-と、FacebookのボタンをクリックするとウェブアプリケーションでFacebookのログインを使用している場合、redirect_uriはどこに設定されていますか?
window.fbAsyncInit = function() {
console.log('loginCtrl.window.fbAsyncInit: initiating FB ...');
FB.init({
appId: '1058057514286456', // rand's peoplecount-www app
//status: true,
//cookie: true,
xfbml: true,
version: 'v2.5'
});
(function (d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) {
return;
}
js = d.createElement(s);
js.id = id;
js.src = "//connect.facebook.net/en_US/sdk.js";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));
、それが呼び出す:私はFacebookのログインボタンを押し
FB.login(function (response) {
console.log('FB Reg : Response - ' + JSON.stringify(response));
if (response.authResponse) {
console.log('Welcome! Fetching your information.... ');
FB.api('/me', {fields: 'name, email,first_name,last_name,verified'}, function (response) {
$scope.saveUserInfo('$scope.fbRegistration', response);
console.log('fbReg: api response='+JSON.stringify(response));
});
} else {
console.log('fbReg: User cancelled login or did not fully authorize. response='+JSON.stringify(response));
}
});
は、私はFacebookのダイアログがで開きます
コードありますメッセージ:
URL Blocked
This redirect failed because the redirect URI is not whitelisted
in the app’s Client OAuth Settings. Make sure Client and Web OAuth
Login are on and add all your app domains as Valid OAuth Redirect URIs.
リダイレクトURIはどのようなものを使用していますか?どこで設定しますか?
https://developers.facebook.com/docs/facebook-login/web ===リダイレクトについては、このWebページの会談で何もURI
https://developers.facebook.com/docs/facebook-login/manually-build-a-login-flow ===これはその上にREDIRECT_URIとURLへの呼び出しがあります。この手動の方法を使用する必要がありますか?
https://www.facebook.com/dialog/oauth?
client_id={app-id}
&redirect_uri={redirect-uri}
おかげ