https://developers.facebook.com/docs/sh ... re-dialog/
вот полный код.
Код: Выделить всё
window.fbAsyncInit = function() {
FB.init({
appId : '${grailsApplication.config.facebookAppId}',
xfbml : true,
version : 'v21.0'
});
};
[url=#]Share me[/url]
// Only works after `FB.init` is called
function myFacebookLogin() {
$('#fooBar').hide();
$('#noThanksSection').hide();
$('#status').show();
var lnk = $('input[name=referralLink]').val();
FB.ui({
method: 'share',
href: lnk
}, function(response){
if(response && !response.error_code){
$('#nextSection').show();
$('#noThanksSection').hide();
alert("Post was successful!");
$('#status').hide();
}
else{
alert('Error occured! Please try again!');
$('#fooBar').show();
$('#noThanksSection').show();
$('#status').hide();
}
});
}
Как мы можем узнать, была ли опубликована публикация в Facebook или всплывающее окно было закрыто без публикации?
Я ценю любую помощь ! Спасибо!
Подробнее здесь: https://stackoverflow.com/questions/793 ... successful
Мобильная версия