This question is partially addressed here, but I cannot use this answer, since my user doesn't necessarily like this specific fan page.
The issue: I have numeric fan page IDs saved at my DB, I would like to provide my user with a link directly to my app page at a certain fan page.
The problem: https://www.facebook.com/[NUMERIC_ID]/app_[MY_APP_ID]
Doesn't seem to work.
But https://www.facebook.com/[FAN_PAGE_NAME]/app_[MY_APP_ID]
does work.
Thus I need a way to convert the numeric fan page id to the actual fan page name(maybe CURLing the page?).
I would like to do it either through the PHP SDK, the graph API, or FQL. The language I need to implement this in is PHP.
EDIT:
I need a way of doing this with no auth token, or with the auth token of my app, since the mentioned page is a public page, that doesn't require Facebook authentication
I think you can find your answer here https://developers.facebook.com/docs/reference/api/page/
To read a Page you need:
- an app or user access token for public and non-demographically restricted pages
- a user access_token for restricted pages that the current user is able to view (no special permissions required)
A Graph API request such as /[PAGE_ID]?fields=id,name,link
will return (where PAGE_ID is 19292868552)
{
"id": "19292868552",
"link": "http://www.facebook.com/FacebookDevelopers",
"name": "Facebook Developers"
}