views:

474

answers:

1

I have a facebook application that can be added to fan pages as a tab. The application requires that users are authenticated in order to use it. This can be accomplished by using requirelogin=1 in a link which is visible only to users who have NOT added the application. This part works fine.

However, after the user has given my application permission from the dhtml pop up that requirelogin opens, I want the tab to reload. In order to do that, I need the full URL to be included in the link as follows:

<a href="http://www.facebook.com/pages/PAGE_NAME/PAGE_ID?v=app_APP_ID" requirelogin=1>Authorize</a>

I cannot figure out how to get the full url or, at least, the PAGE_NAME to build this url dynamically. Seems like the app should be able to know where it is without any special permissions.

+1  A: 

If you have the PAGE ID and APP ID, this is what you do:

http://www.facebook.com/profile.php?id=PAGE_ID#v=app_APP_ID

For example:

http://www.facebook.com/profile.php?id=282955631557#v=app_278523304881
Tytus
... yes but that requires have the page id (hard coded) in advance... it is not a dynamic solution.
Paul

related questions