Inscrivez-vous ou connectez-vous pour rejoindre votre communauté professionnelle.
Publish actions is the name of the permission and how to do so? using a JavaScript function:
FB.login(function(response) { //This shows a pop up asking to use your facebook account or to login with one
if (response.authResponse) {
if (response.status=="connected") {
FB.api("/me/permissions/publish_actions", function (permissionsResponse) {//This call asks for your permission to let the app post on your behalf
if (permissionsResponse && !permissionsResponse.error && permissionsResponse.data.length>0 && permissionsResponse.data[0].status == "granted") {
//and here where you can do something or do nothing with the access_token if you wanna keep it
}
});
} else {
show_hide_loading(false);
}
} else {
show_hide_loading(false);
//show a customized message
}
}, {scope:"publish_actions"});