【问题标题】:Adding Facebook page tab using JavaScript SDK使用 JavaScript SDK 添加 Facebook 页面选项卡
【发布时间】:2017-02-27 21:58:13
【问题描述】:

在 Facebook SDK (JavaScript) 中,将页面标签添加到页面的 API:

/* make the API call */
FB.api(
"/{page-id}/tabs",
"POST",
{
    "object": {
        "app_id": "{app-id}"
    }
},
function (response) {
  if (response && !response.error) {
    /* handle the result */
  }
}
);

我已经按原样尝试了这个 API 调用,但它不起作用,一条错误消息说:

(#100) 必须提供参数 'tab' 或 'app_id' 中的一个且只有一个

【问题讨论】:

    标签: facebook facebook-graph-api facebook-javascript-sdk


    【解决方案1】:

    我认为很明显你只需要提供一个参数

    【讨论】:

      【解决方案2】:
      /* make the API call */
      FB.api(
      "/{page-id}/tabs",
      "POST",
      {
              "app_id": "{app-id}"
          },
      function (response) {
        if (response && !response.error) {
          /* handle the result */
        }
      }
      );
      

      以这种方式通过。

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2012-04-15
        • 1970-01-01
        • 2017-06-30
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多