How can i see if current user is admin of facebook canvas app
I am working in a facebook canvas app which has an edit settings page. I need to protect that page开发者_开发百科 so only the application administrators have access to it.
I couldn´t find any information about how to do this. This should be a pretty basic feature.
Any ideas?
FQL
SELECT uid, page_id, type from page_admin WHERE page_id=YOUR_APP_ID AND uid=me()
Graph
Alternatively, you can get the Pages/Applications that the user is admin of using:
https://graph.facebook.com/me/accounts
Your app will require the manage_pages
permission. For more details see:
http://developers.facebook.com/docs/authentication/#page-login
how about storing admin id's in a db, etc ,get the id of the currenly logged in user ..compare and decide .
精彩评论