How to add an application to a page through the Graph API? (with the pearl of the Koala)

Ok, I have a Rails app using the Koala gem. I have manage_pages permissions and I can successfully get custom pages and access_tokens.

I want to add an application with a page tab to one of the user pages. Basically the equivalent of switching to an application profile, clicking “add to page” and selecting a page to add it.

I do not see where this is done in the Graph API.

+4
source share
3 answers

If you have permission to manage pages using the Graph API, you can set profile_tab at the end of the current list of installed tabs for a page by sending an HTTP POST request to PAGE_ID / tabs with a page access token

https://graph.facebook.com/YOUR_PAGE_ID/tabs/create/?app_id=YOUR_APP_ID&access_token=YOUR_TOKEN

Hope this helps.

+4
source

I do it like this:

koala = Koala::Facebook::API.new( page_token ) tabs = koala.get_connections("me", "tabs") koala.put_connections("me","tabs", {app_id: new_app_id }, {api_version: "v2.3"}) tabs = koala.get_connections("me", "tabs") 

check the tabs and search for the newly added tab.

If you want to remove the tab:

 koala.delete_connections("me","tabs", {app_id: id_to_be_deleted }, {api_version: "v2.3"}) 
+1
source

Hey, the answer that gave yes is right. I also did the same. https://graph.facebook.com/pageid/tabs?app_id=applicationid&method=POST & access_token = page access token With this facebook request, I can add the application profile page to my facebook fan page. But I am adding a comment to this fan page. But this is a new window manually, and you wanted to add a comment window inside the fan.Can page. I used the comment plugin, how to use this? Application in fbml.

0
source

All Articles