使用 php 从单个 Facebook 应用程序添加多个 Facebook 页面选项卡

发布于 2025-01-01 03:12:30 字数 294 浏览 4 评论 0 原文

我创建了一个 Facebook 应用程序。 现在我希望使用此应用程序我需要在页面中添加多个页面选项卡。

所有这一切我想在 php 中完成 我已完成以下步骤

1) 使用我的 php 脚本登录 facebook 并获取用于管理页面的身份验证代码。 2)检索我登录的用户个人资料中的页面列表。

现在我不知道如何以编程方式在 Facebook 中添加页面选项卡。 我知道有一个手动选项,在应用程序设置中添加页面选项卡

,但我想使用 php 以编程方式添加它。

任何帮助将不胜感激。

问候

I have created a facebook application.
Now i want that using this application i need to add multiple pagetabs in a page.

and all of this i want to do in php
I have completed following steps

1) Logged in to facebook using my php script and got authenticaticationc code for managing pages.
2) Retrieved the list of pages i have in loged in users profile.

Now i don't know how to add a page tab in facebook programmatically.
I know there is a manual option and that is in applications settings to add a page tab

but I want to add it Programmatic using php.

Any help will be very appreciated.

regards

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

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

发布评论

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

评论(1

骄兵必败 2025-01-08 03:12:30

应用程序允许有一个页面选项卡。因此,如果您需要在单个页面上为同一应用程序提供多个选项卡,则无法实现此目的。

如果您想为其他应用程序添加选项卡,则只需使用页面 access_token 发出 POST(来自该应用程序管理员的用户的 accounts 连接)页面)请求:

https://graph.facebook.com/PAGE_ID/tabs?app_id=APPLICATION_ID&access_token=...

您需要为每个要添加为选项卡的 APPLICATION_ID 重复该步骤,或者 批量请求。有关页面选项卡创建的更多信息,请参阅 page 对象的文档

Applications are allowed to have one Page Tab. So if you need to have multiple tabs for same app on single page where is no way to achieve this.

If you desire to add tabs for other applications you just need to issue POST with page access_token (from accounts connection of user who is admin of that page) request to:

https://graph.facebook.com/PAGE_ID/tabs?app_id=APPLICATION_ID&access_token=...

You need either repeat that step for every APPLICATION_ID you want to be added as tab or Batch requests. Read more on page tabs creation in documentation for page object

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