how can i check in javascript if user has granted my site the publish stream permission
?
Tap in the top right of Facebook. Scroll down and tap Settings. Go to the Permissions section and tap Apps and Websites. Go to Apps, Websites and Games and tap Edit.
From your Page, click Manage, then click Page Access. Click next to the person that you want to edit access, then click Edit Access. Click or to select the features you want this person to manage, then click Update Access. Type your Facebook password, then tap Confirm.
By Account: Click Accounts, then select a type of account. Select an account to view the people who have access to it. Select a person to view their level of permission. Select the Pages, the people, partners and connected assets.
On your browser head to the upper right corner of the Facebook page. Click Settings and Privacy > Privacy. On the left side you should be able to see a field named Apps and Websites where you will see which apps currently have access to your data. If you click View and edit you can make changes on this list.
I had this same problem but couldn't find any sample code. Anyways, I came up with this, which works for me. Hope this helps someone.
FB.api('/me/permissions', function (response) {
var perms = response.data[0];
if (perms.publish_stream) {
// User has permission
} else {
// User DOESN'T have permission
}
} );
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With