我们需要新的完整的页面选项卡文档。请从这里开始

发布于 2025-01-01 12:57:13 字数 950 浏览 4 评论 0原文

当前用于创建页面选项卡的 Facebook 开发人员文档并不完整,而且看起来该过程刚刚再次发生了变化。 Stackoverflow 上的解释仍然没有很好地描述这个过程。

名为“DMCS”的 Stack GURU 表示,一旦创建了应用程序,您可以将以下字符串粘贴到浏览器栏中,以告诉 Facebook 创建一个指向该应用程序的选项卡。

https://www.facebook.com/dialog/pagetab?app_id=YOUR_APP_ID &display=popup&next=THE_PAGE_TO_BE_ADDED_TO

(1) 粘贴此内容时应该在哪个网页?我们希望选项卡出现在哪个 Facebook 页面上? (2) 我假设 THE_PAGE_TO_BE_ADDED_TO = 当我们位于希望显示选项卡的 Facebook 页面上时,浏览器栏中显示的 URL 末尾的数字。是的?

例如,我将使用以下 URL 中的 312467645451883:https://www.facebook.com/pages/Testing/312467645451883 注意:如果以上均为真,我尝试了此操作并收到以下错误消息:

API 错误代码:100 API错误描述:无效参数 错误消息:redirect_uri URL 格式不正确

我的应用程序设置如下。哪个是redirect_uri URL?它的格式如何不正确?

页面选项卡 URL:http://sensitivegardener.me/?page_id=80(非 SSL url) 安全页面选项卡 URL:httpS://sensitivegardener.me/?page_id=80(SSL url) 页面选项卡编辑 URL:(空白)

最后...... URL 粘贴看起来非常笨拙。为什么没有 API 事务来自动执行此操作?这是页面创建者需要具备的基本功能。

The current Facebook Developers documentation for creating a Page Tab is incomplete AND it looks like the process just changed again. Explanations on Stackoverflow are still not describing the process well.

Stack GURU who goes by the name of "DMCS" said that once you’ve created an app, you can paste the following string into the browser bar in order to tell Facebook to create a tab that points to that app.

https://www.facebook.com/dialog/pagetab?app_id=YOUR_APP_ID &display=popup&next=THE_PAGE_TO_BE_ADDED_TO

(1) What web page should we be on when we paste this? The facebook page we want the tab to appear on?
(2) I’m assuming THE_PAGE_TO_BE_ADDED_TO = numbers at the end of the URL displayed in the browser bar when we're on the Facebook page we want the tab to display on. Yes?

For example, I would use 312467645451883 from the following URL: https://www.facebook.com/pages/Testing/312467645451883

NOTE: If all above it true, I tried this and received the following error message:

API Error Code: 100
API Error Description: Invalid parameter
Error Message: redirect_uri URL is not properly formatted

My app settings follow. Which is the redirect_uri URL and how is it improperly formatted?

Page Tab URL: http://consciousgardener.me/?page_id=80 (non-SSL url)
Secure Page Tab URL: httpS://consciousgardener.me/?page_id=80 (SSL url)
Page Tab Edit URL: (BLANK)

FINALLY… the URL paste seems very clunky. Why isn’t there an API transaction to automate this? It is a basic function and page creator needs to have.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

|煩躁 2025-01-08 12:57:13

最后……网址粘贴看起来非常笨拙。为什么没有API
交易来自动化这个?它是一个基本功能和页面创建器
需要有。

url 是 FB.ui() 调用的辅助选项。请参阅:http://developers.facebook.com/docs/reference/dialogs/add_to_page/

<html xmlns="http://www.w3.org/1999/xhtml"
  xmlns:fb="https://www.facebook.com/2008/fbml">
  <head>
    <title>My Add to Page Dialog Page</title>
  </head>
  <body>
    <div id='fb-root'></div>
    <script src='http://connect.facebook.net/en_US/all.js'></script>
    <p><a onclick='addToPage(); return false;'>Add to Page</a></p>
    <p id='msg'></p>

    <script> 
      FB.init({appId: "YOUR_APP_ID", status: true, cookie: true});

      function addToPage() {

        // calling the API ...
        var obj = {
          method: 'pagetab',
          redirect_uri: 'YOUR_URL',
        };

        FB.ui(obj);
      }

    </script>
  </body>
</html>

FINALLY… the URL paste seems very clunky. Why isn’t there an API
transaction to automate this? It is a basic function and page creator
needs to have.

The url is a secondary option to the FB.ui() call. See: http://developers.facebook.com/docs/reference/dialogs/add_to_page/

<html xmlns="http://www.w3.org/1999/xhtml"
  xmlns:fb="https://www.facebook.com/2008/fbml">
  <head>
    <title>My Add to Page Dialog Page</title>
  </head>
  <body>
    <div id='fb-root'></div>
    <script src='http://connect.facebook.net/en_US/all.js'></script>
    <p><a onclick='addToPage(); return false;'>Add to Page</a></p>
    <p id='msg'></p>

    <script> 
      FB.init({appId: "YOUR_APP_ID", status: true, cookie: true});

      function addToPage() {

        // calling the API ...
        var obj = {
          method: 'pagetab',
          redirect_uri: 'YOUR_URL',
        };

        FB.ui(obj);
      }

    </script>
  </body>
</html>
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文