以编程方式向Facebook页面添加标签 [英] add a tab to facebook page programmatically

查看:97
本文介绍了以编程方式向Facebook页面添加标签的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个托管音乐的网站(stereokiller.com)-示例乐队页面为 http:// www.stereokiller.com/rapture

I have a site that hosts music (stereokiller.com) - a sample band page would be http://www.stereokiller.com/rapture .

我正在尝试创建一个Facebook应用程序,该应用程序将在加载了播放器和我网站上其他一些信息的用户的Facebook乐队页面上插入一个新标签。但是,我不确定如何通过iframe应用传递任何参数来确定要显示哪些波段信息?我知道FB_SIG_PAGE_ID,然后可以从Graph API获取所有者页面名称,但是如果我的网站上存在多个具有相同名称的区域,那么我们可能会遇到问题。

I am attempting to create a facebook application that will insert a new tab into a user's band page on facebook loaded with the player and some other information from my site. However, i'm not sure how to pass the iframe app any parameters to determine which band information to show? I'm aware of the FB_SIG_PAGE_ID which I could then get the owner page name from the Graph API, but if there are multiple bands on my site with the same name then we could have issues.

[已解决]

我知道了。

[solved]
I figured it out.

进行http呼叫到graph.facebook.com/me/accounts?access_token= {访问令牌}。循环搜索结果,并获得通过上一次调用获取的访问令牌,然后针对要添加的应用程序以param {app_id}的形式将其发布到graph.facebook.com/{PAGE_ID}/tabs。

do an http call to graph.facebook.com/me/accounts?access_token={access token}. loop through results with the access token retrieved through the prior call, then do http post to graph.facebook.com/{PAGE_ID}/tabs with the form param {app_id} for the app of which you want to add.

推荐答案

您可以通过向PAGE_ID / tabs发出HTTP POST请求,在页面的已安装标签页当前列表的末尾安装profile_tab。页面访问令牌:

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:

参数说明类型必需
app_id要为其安装选项卡的应用程序的ID。字符串Y

Parameter Description Type Required app_id ID of the application for which to install the tab. string Y

如果创建成功,则返回以下信息:
描述类型
如果创建成功,则布尔值

If the create is successful, you get the following return: Description Type If the create succeeded boolean

这篇关于以编程方式向Facebook页面添加标签的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆