检查页面选项卡应用程序是否仍然安装
使用图形 API 检查选项卡应用程序是否仍安装在特定粉丝页面上的最佳方法是什么?
我能想到的唯一方法是使用 https://graph.facebook.com/page_id/ tabs/app_id,这将返回给定选项卡的数据(如果已安装),但似乎需要 access_token。我认为,要使用这种方法,我不仅需要向用户询问manage_pages权限,还需要询问offline_access,然后我可以存储page_access_token并能够在以后使用它,其唯一目的是检查应用程序是否已被访问。删除?
考虑到在不登录 Facebook 的情况下,您可以看到粉丝页面上安装的所有选项卡,这不仅仅是公共信息,这似乎很奇怪?
这是一个关于取消授权回调的类似问题: http://facebook.stackoverflow.com/questions/8000163/deauthorize-page-tab-notification< /a>
谢谢
What is the best way to check if a tab app is still installed on a specific Fan Page, using the graph api?
The only way I can come up with is using, https://graph.facebook.com/page_id/tabs/app_id, and this will return the data for the given tab, if it is installed, but it appears a access_token is required. To use this method, I think, I would need to ask the user for not only the manage_pages permissions but also for the offline_access, then I could store the page_access_token and be able to use it later for sole purpose of checking if the app has been removed?
It seems odd that this wouldn't just be public information, considering without being logged into Facebook, you can see all the tabs installed on a fan page?
Here is a similar question asking about the Deauthorize Callback:
http://facebook.stackoverflow.com/questions/8000163/deauthorize-page-tab-notification
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

根据我的测试和 Facebook 的文档,您不需要用户的访问令牌来检查应用程序是否已安装(尽管您可以使用它)。我发现作为您的应用程序登录更容易。以下 Facebook 的链接向您展示了具体操作方法。查看“应用程序登录”部分。
简而言之,您在 php 中获得了一个应用程序访问令牌,如下所示:
然后您可以使用该访问令牌来获取数据选项卡:
正如您所看到的,我对该文件的内容进行了 json 解码,然后检查该应用程序 ID 是否存在于页面上。
这有帮助!
From my testing and according to Facebook's documentation, you don't need a user's access token to check if an app is installed (although you can use it). I found it easier to login as your app. Here's facebook's link that shows you how. Look at the section called "App Login".
In short, you get an app access token with something like this in php:
Then you can use that access token to get the data tab:
As you can see, I json decoded the contents of that file and then do a check to see if that app id exists on the page.
I hope that helps!