Take the 2-minute tour ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

With Facebook API, within a custom app added to a fanpage, how do I recognize 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 contains 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)
share|improve this question
add comment

1 Answer

There are two easy ways to get your fanpage ID:

You have less than 25 fans:

Your fanpage ID is appended to your fanpage URL.
Example: http://www.facebook.com/pages/Social-Media/155188264543525
Your fanpage ID would be: 155188264543525

You have more than 25 fans and have set your vanity URL:

Browse to https://graph.facebook.com/YOURPAGENAME
Example: https://graph.facebook.com/ULTRAGEIL
The first two lines of the output shows:
{
"id": "116645905081622",
Your fanpage ID would be: 116645905081622
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.