Redirect zur Startseite nach dem login über "login mit facebook" :Javascript
Bin ich mit dem "login mit facebook" in meiner Anwendung. Ich will redirect zur Startseite, wenn Sie die Taste "Login mit facebook" - button. Ich weiß nicht, wie es zu implementieren...
Code ist,
<script>
window.fbAsyncInit = function() {
FB.init({
appId : 'APP ID', //App ID
channelUrl : 'http://www.***.com/', //Channel File
status : true, //check login status
cookie : true, //enable cookies to allow the server to access the session
xfbml : true //parse XFBML
});
//Load the SDK Asynchronously
(function(d){
var js, id = 'facebook-jssdk', ref = d.getElementsByTagName('script')[0];
if (d.getElementById(id)) {return;}
js = d.createElement('script'); js.id = id; js.async = true;
js.src = "js/all.js";
ref.parentNode.insertBefore(js, ref);
}(document));
</script>
<div id="fb-root"></div>
<div class="fb-login-button" data-show-faces="true" data-width="200" data-max-rows="1"></div>
Bitte helfen,
Dank
Du musst angemeldet sein, um einen Kommentar abzugeben.
Verwenden Facebook Event:
neuen code:
ändern
index.html
mit Ihrer homepage-url.wenn Sie hinzufügen möchten
logout
zu:<fb:login-button perms="email,publish_stream" autologoutlink="true" onlogin="window.location = '/index.html"></fb:login-button>
setzen Sie Ihre Dauerwellen eswindow.location.href = 'index.html';
ändern Sie Ihre login-Taste, um
Ändern index.html zu Ihrer homepage-url