Possible Duplicate:
Create facebook tab for only my company page
Is there any way to limit who can add a facebook application to their page. Take this Application as an example: http://www.facebook.com/apps/application.php?id=113740922048869
On the lower left there is a link to "Add to My Page". How do I prevent apps from being publicly available for anyone to add? I don't see any settings other than putting the app in "sandbox mode" that would limit who could add the app. Here is the content for the description of sandbox mode:
"If enabled, only app developers will be able to use app."
The purpose of this app is to detect whether or not the user viewing it is a fan of the page it is on and then display content for fans. In this scenario it doesn't make any sense for anyone else to add this app to their page other than the intended fan page whom I have administrative rights to. Am I being incredibly dense here?
I don't know of a setting to prevent people from adding it to their page, but as Igy said, any app can check the signed_request['page']['id']
parameter to make sure the app is being loaded from an authorized page:
if (isAuthorized($signed_request['page']['id'])) {
// do your thing, check 'liked' parameter, etc..
} else {
echo "This app is not authorized for use on this page.";
}
If you are already checking the signed_request
data for whether the user likes the page, it's not too much more to check the page
parameter to check that the app is accessed through your page.
Check this answer: Create facebook tab for only my company page - the page
parameter of the signed_request
will show you the page ID, how to detect if the current user likes the page or is an admin of the page, you can then display different content in each case