我使用Facebook的JavaScript SDK,並要啓用通用登錄。這意味着我讓我在我的網站,我可以訪問網站正常的帳戶。同時,我想這個登錄與Facebook自動登錄。對於這一點,我必須首先創建一個Facebook應用程序,並與我的Facebook帳戶verknüfpen這一點。我已經做到了。的JavaScript API自動Facebook的登錄爲來自HootSuite
但我怎麼能現在走的Facebook按鈕登錄登錄使用自動登錄我在Facebook普通用戶帳戶?
對於一些誰理解這個問題直接:zu Hootsuite
隨着來自HootSuite我可以創造一個正常的自由來自HootSuite帳戶(單獨的登錄如Facebook)。然後,我鏈接到我的Facebook帳戶,並與來自HootSuite Facebook應用程序,我的Facebook粉絲頁面。整件事發生一次。每當我現在來自HootSuite高於正常的帳戶登錄我自己直接輸送至Facebook等記錄,並可以訪問一切。
我知道整個事情是應該有什麼關係訪問令牌。不幸的是,我認爲互聯網只是沒有一個教程,我可以一個這樣的情況下進行編程。
我以前的代碼到目前爲止只有正常的Facebook憑據:我怎樣才能程序,自動Facebook登錄如來自HootSuite現在
<div id="fb-root"></div>
<script>
function checkLoginState() {
FB.getLoginStatus(function(response) {
statusChangeCallback(response);
});
}
// This is called with the results from from FB.getLoginStatus().
function statusChangeCallback(response) {
console.log('statusChangeCallback');
console.log(response);
// The response object is returned with a status field that lets the
// app know the current login status of the person.
// Full docs on the response object can be found in the documentation
// for FB.getLoginStatus().
if (response.status === 'connected') {
// Logged into your app and Facebook.
document.getElementById('status').innerHTML = 'Verbunden';
} else if (response.status === 'not_authorized') {
// The person is logged into Facebook, but not your app.
document.getElementById('status').innerHTML = 'Please log ' +
'into this app.';
} else {
// The person is not logged into Facebook, so we're not sure if
// they are logged into this app or not.
document.getElementById('status').innerHTML = 'Please log ' +
'into Facebook.';
}
}
window.fbAsyncInit = function() {
FB.init({
appId : 'AppID',
xfbml : true,
status : true,
cookie : true,
version : 'v2.1'
});
FB.getLoginStatus(function(response) {
statusChangeCallback(response);
});
};
(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/de_DE/sdk.js";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));
</script>
?
對不起,這是一個英文網站。我不知道在這一點上,這樣一個本地化的德語版本,但有一個葡萄牙語。 – mskfisher 2014-10-31 17:10:32