how to get if the user is page admin on facebook fan page custom tab
I am developing a tab based Facebook application that lets the users add custom tab to their page. I want to add a link for page admins to edit the tab, but the problem is how to get if the logged in user is a page admin? I know how to do this is the old API, which are to be deprecated soon. I am using the new Graph API and new JavaS开发者_StackOverflow中文版cript SDK. Don't know how to do it with that.
Take a look at the fb_sig_is_admin parameter which is 1 when the user is an admin.
Unfortunately you won't know who the user is with a tab until they interact, so the usefulness of the Graph API is limited.
I think there is a better way for that, a few days ago FB started supporting iframe on tabs,
From the facebook documentation
Blockquote When a user navigates to the Facebook Page, they will see your Page Tab added in the next available tab position. Broadly, a Page Tab is loaded in exactly the same way as a Canvas Page. When a user selects your Page Tab, you will received the signed_request parameter with one additional parameter, page. This parameter contains a JSON object with an id (the page id of the current page), admin (if the user is a admin of the page), and liked (if the user has liked the page). As with a Canvas Page, you will not receive all the user information accessible to your app in the signed_request until the user authorizes your app. Blockquote
This is the URL: http://developers.facebook.com/docs/guides/canvas/#tabs
精彩评论