Start networking and exchanging professional insights

Register now or log in to join your professional community.

Follow

What is the permission name that developers use to post on facebook on the behalf of other user using an app and how to do so?

user-image
Question added by Deleted user
Date Posted: 2015/07/23
Deleted user
by Deleted user

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"});

More Questions Like This