Add a Tab to a Company's Page - Programmatically

主宰稳场 提交于 2019-12-24 11:30:02

问题


I really need help with this... is it doable? Is it possible to add a Tab to a Company's Page programatically (like FBML, where the users writes their own HTML code)? Such as the C# SDK or through some other SDK? How would I do it?


回答1:


Facebook Graph API allows it with permission "manage_pages".

http://developers.facebook.com/docs/reference/api/page/#tabs

You can install a profile_tab at the end of the current list of installed tabs for a page by issuing an HTTP POST request to PAGE_ID/tabs with a Page Access Token.

Javascript SDK:

FB.api('/' + PAGE_ID + '/tabs','post',
{ app_id: APP_ID, access_token: PAGE_TOKEN }, function (response) { });

Otherwise you could POST the same data via C# and a valid page access token. You get the page access token from /user/accounts: http://developers.facebook.com/docs/reference/api/user/




回答2:


From the research I've done, I don't think there's a way to do it programmatically directly. However, you can use the following link:

http://facebook.com/add.php?pi_key=YOUR_APP_KEY&pages=1&page=YOUR_PAGE_ID



来源:https://stackoverflow.com/questions/7375320/add-a-tab-to-a-companys-page-programmatically

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!