With Facebook API, within a custom app added to a fanpage (tab app), how do I get the fanpage ID?
Here’s what I’m trying to achieve:
- user goes to the full-width canvas app, he authorizes himself there and allows the app to add a tab to one of the fanpages he’s administrating
- every Facebook user going to that fanpage, sees the tab and the tab shows content specific to that fanpage (that’s why I need to know the fanpage ID)
- if fanpage administrator wants to change something, he goes to the full-width canvas and logs in to my service (here’s where I store what he wants to show in his Fanpage)
From a parsed signed request (to an tab iFrame) you can get the page id – the contents would be similar to the following (output of PHP print_r):
For more information see:
http://developers.facebook.com/docs/authentication/signed_request/