Answer the question
In order to leave comments, you need to log in
Facebook share button?
1. I need such a button to share
2. I need to know if the user has published a post on the wall or not.
Therefore, the standard buttons do not suit me.
Fb made an api but made an incomprehensible description of this api.
For example, it is written here
FB.ui(
{
method: 'share',
href: 'https://developers.facebook.com/docs/',
},
// callback
function(response) {
if (response && !response.error_message) {
alert('Posting completed.');
} else {
alert('Error while posting.');
}
}
);
Answer the question
In order to leave comments, you need to log in
description of how to connect and initialize the FB object: https://developers.facebook.com/docs/javascript/qu...
<script>
window.fbAsyncInit = function() {
FB.init({
appId : 'your-app-id',
autoLogAppEvents : true,
xfbml : true,
version : 'v3.1'
});
};
(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 = "https://connect.facebook.net/en_US/sdk.js";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));
</script>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question