如果我们想通过Facebook应用程序令牌获得Facebook页面的计数(没有Facebook登录),请进行审查? [英] Do review required if we want to get Facebook Page like count (Without Facebook login) by Facebook app token?

查看:135
本文介绍了如果我们想通过Facebook应用程序令牌获得Facebook页面的计数(没有Facebook登录),请进行审查?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在网站上做一个静态网页,其中我显示了特定Facebook页面的数量。没有任何类型的登录需要看到这个网页。此外,我不想让用户通过他们的Facebook帐户登录,以查看Facebook页面的计数。



我已经通过使用Facebook应用程序令牌来实现这一要求。



API: https://graph.facebook.com/PAGE_ID?access_token=APP_TOKEN



但是这里的问题是,如果我使用Facebook已经批准的应用程序的某个权限(manage_pages)存在的应用程序令牌,它可以工作。它不适用于新创建的Facebook应用程序的应用程序令牌。



我已通过请求manage_pages权限将应用程序发送给Facebook,但他们拒绝了该应用,并表示我的网站没有实施Facebook登录功能。 / p>

由于没有清楚的记录,我怀疑这个应用程序是否需要发送审查,如果我想得到没有Facebook登录的Facebook页面(通过使用Facebook应用程序令牌)?如果是,我想请求什么权限?



任何帮助将不胜感激。

解决方案

首先,您需要了解什么令牌:





对于您的问题,您只需使用App Access令牌即可。没有任何权限或登录审查,上面的链接告诉你如何创建一个。确保您不要在客户端使用令牌,特别是因为它包含App Secret。仅在服务器上进行API调用(file_get_contents或curl,如果使用PHP)。



如果通过它不起作用,则表示您只获取ID和名称,那么它不是关于不工作,您需要阅读更改日志并搜索声明字段: https://developers.facebook.com/docs/apps/changelog#v2_4



所以如果你想得到不仅仅是id和name,API调用将是这样的: https://graph.facebook.com/936299239766048?access_token=YOURAPPTOKEN&fields=id,name,likes ,...


I am doing a static web page in my website, in which I am showing the like count of particular Facebook page. There is no kind of login required to see this web page. Also, I don't want to user to login with their Facebook account to see the Facebook page like count.

I have implemented this requirement by using Facebook app token.

API: "https://graph.facebook.com/PAGE_ID?access_token=APP_TOKEN"

But the problem here is, If I use the app token of already approved app by Facebook with some permissions (manage_pages) exists, it works. It is not working for the app token of newly created Facebook app.

I have sent the app for review to Facebook by requesting manage_pages permission, but they rejected the app and said that my website doesn't have the Facebook login functionality implemented.

Since it is not documented clearly, I have a doubt that do the app need to send for review if I want to get the Facebook page like count without Facebook login (By using Facebook app token)? If yes, what permission do I want to request?

Any help would be much appreciated.

解决方案

First of all, you need to learn what Tokens there are:

For your problem, you can just use an App Access Token. There is no need for any permission or Login Review, the links above tell you exactly how to create one. Make sure you never use the Token on the client, especially because it includes the App Secret. Do the API call on the server only (file_get_contents or curl, if you use PHP).

If by "it does not work" you mean that you only get the id and the name, then it´s not about "not working", you need to read the changelog and search for "Declarative Fields": https://developers.facebook.com/docs/apps/changelog#v2_4

So if you want to get more than just id and name, the API call would be like this: https://graph.facebook.com/936299239766048?access_token=YOURAPPTOKEN&fields=id,name,likes,...

这篇关于如果我们想通过Facebook应用程序令牌获得Facebook页面的计数(没有Facebook登录),请进行审查?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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