我可以获得已安装我的 Tab 应用程序的页面列表吗? [英] Can I get a list of Pages that have installed my Tab app?

查看:22
本文介绍了我可以获得已安装我的 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,该 UI 将向用户显示他/她是管理员的所有页面,然后显示其中哪些页面已经安装了我的标签应用程序.我想进行 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?

作为后备,我会在我的数据库中创建一个表来跟踪页面 ID 每当页面查看我的标签时(使用前面提到的签名请求)但这不会那么好,因为它不知道何时有人卸载页面中的选项卡.

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.

推荐答案

在一般情况下,不",无需通过 signed_request 跟踪您的身边,但如果您已经获得 manage_pages 用户访问权限检查页面上是否安装了特定应用程序(即您的应用程序)非常简单

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

详见页面文档,相关部分:

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 应用程序的页面列表吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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