Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to check special permissions in facebook

how can i check in javascript if user has granted my site the publish stream permission

?

like image 342
Yan Avatar asked Oct 13 '09 22:10

Yan


People also ask

How do I check permissions on Facebook?

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.

How do I manage permissions on Facebook?

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.

How can I tell who has access to my Facebook page?

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.

How do I allow 3rd party Apps on Facebook?

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.


1 Answers

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
            }                                            
    } );
like image 156
Andrew Dyster Avatar answered Nov 11 '22 04:11

Andrew Dyster