Я пробую:
Код: Выделить всё
//initializing API
window.fbAsyncInit = function() {
FB.init({appId: '462904197064938', status: true, cookie: true, xfbml: true});
};
(function() {
var e = document.createElement('script'); e.async = true;
e.src = document.location.protocol +
'//connect.facebook.net/en_US/all.js';
document.getElementById('fb-root').appendChild(e);
}());
[url=#]login[/url]
[url=#]logout[/url]
//your fb login function
function fblogin() {
FB.login(function(response) {
alert("login");
}, {scope:'read_stream,publish_stream,offline_access'});
}
function fblogout() {
FB.login(function(response) {
alert("logout");
});
}
Почему он не работает?
Подробнее здесь: https://stackoverflow.com/questions/118 ... -published
Мобильная версия