如何在不登录的情况下获取Facebook页数? [英] How can i get the Facebook page like count without login?

查看:403
本文介绍了如何在不登录的情况下获取Facebook页数?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要在没有用户登录的情况下获取facebook页面。我想在我的网页上显示计数。我不想要一个FB Button,只需要显示计数。我看到有几个人正在使用graph api,但我认为它需要一个accessstoken,所以它也需要用户登录。我不想要那种东西。伙计们帮我解决问题。我也会尝试,如果我之前得到解决方案,将在这里发表评论。

I need to get the facebook page like count without user login. I want to show the count on my webpage. I don't want an FB Button, need to show the count only. I saw that several people are using graph api, But I think it requires an accesstoken, so it also required to login by the user. I don't want that kind of stuffs. Guys help me with a solution. I will also trying, if I get a solution before, will comment here.

推荐答案

这将是API调用:

https://graph.facebook.com/ [page-id]?fields = name,fan_count& access_token = [any-access-token]

回复(JSON):

{
  "name": "xxx",
  "fan_count": 216,
  "id": "xxx"
}

关于一般的代币:

  • https://developers.facebook.com/docs/facebook-login/access-tokens/
  • http://www.devils-heaven.com/facebook-access-tokens/

这篇关于如何在不登录的情况下获取Facebook页数?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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