Balakrishnan
Balakrishnan

Reputation: 1073

Adding Facebook Application to a page through API

I am trying to add my Facebook application through an api. I used http://www.facebook.com/add.php?api_key=xxx&pages=1&page=xxx

This adds the app as a tab in the page successfully and it works. However my doubts are

1) is it supposed to be a documented feature? For i couldn't find any formal documentation (or am i missing something?)

2) is this the only method or is there any other means? For, the above one requires an active login. Something through a graph api etc. through oauth_token to be used in an external application.

3) What else can i do with this other than adding? Like say making it as a landing tab, etc.

Thanks a lot.

Upvotes: 5

Views: 3698

Answers (2)

Eric Cope
Eric Cope

Reputation: 877

Here is how to use the Graph API

https://graph.facebook.com/<page_id>/tabs?app_id=<your_app_id>&method=post&access_token=<previously_fetched_access_token_for_page_id>

First you need to request access with the scope including 'manage_pages' within the request. Then, you can get the user's pages using '/me/accounts?access_token='

Once you get the list of pages, each page should come with an access token to use with the tabs API call.

Here are some references -
http://forum.developers.facebook.net/viewtopic.php?pid=361995
https://developers.facebook.com/docs/reference/api/

Upvotes: 6

Tony
Tony

Reputation: 838

Regarding #3, I believe with the latest upgrade FB will be eliminating the option of selecting a custom landing tab.

Upvotes: 0

Related Questions