问题描述
我已经看过类似的问题了几次,但通常来自于人们试图找出哪一页正在访问他们的Tab应用程序。 (您可以通过检查signed_request来执行此操作。)
I've seen a similar question asked a few times, but usually it is from people trying to find out which Page is currently accessing their Tab app. (Which you can do by inspecting the signed_request.)
我正在尝试构建一个UI,以向用户显示他/她是管理员的所有页面,然后显示哪些页面已经安装了我的Tab应用程序。我想做一个FB图API调用a)获得安装了我的Tab应用程序的页面列表,或者b)获取一个是/否的答案是否一个特定的页面已经安装。这是可能的吗?
I'm trying to build a UI that will show the user all the Pages that he/she is an Admin of, and then display which of those Pages have my Tab app already installed. I'd like to make a FB graph API call to either a) get the list of Pages that have my Tab app installed or b) get a yes/no answer for whether a particular Page has it installed. Is this possible?
作为一个回退,当我的Tab浏览我的Tab(使用上述signed_request)时,我将在数据库中创建一个表,以跟踪页面ID因为不知道有人从页面上卸载了Tab。
As a fallback, I will make a table in my database to track Page IDs whenever a Page views my Tab (using the aforementioned signed_request) but this won't be as good, because it won't know when someone has uninstalled the Tab from a Page.
推荐答案
在一般情况下case,'no',而不通过 signed_request
跟踪你,但是如果你已经获得了 manage_pages
从用户来看,检查一个特定的应用程序(即yours)是否安装在页面上是非常简单的。
In the general case, 'no', without keeping track on your side via the signed_request
but if you're already obtaining manage_pages
access from the user it's pretty trivial to check if a particular app (i.e, yours) is installed on the page
请参阅,详细信息,相关部分:
See the page documentation for details, relevant part:
You can test if a specific app is installed on a page profile tab by issuing an
HTTP GET to PAGE_ID/tabs/APP_ID. If the app is installed, this will return the
following fields:
(你会需要来自该用户的 / accounts
连接的页面访问令牌
(you'll need the page access token from the user's /accounts
connection for that call
这篇关于可以列出已经安装了我的Tab应用的页面吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!