Facebook Like 按钮可以设为只读吗?
我在我的网站中使用 Facebook Likes。我有一个图库页面,显示图片/视频数据以及该数据的喜欢数量。每条数据都有自己的URL,可以点赞。
但是,我想在图库导航中显示喜欢的数量,但我不希望人们能够从导航中“喜欢”。有没有一种方法可以在没有按钮的情况下显示点赞数?
到目前为止,我看到的唯一方法是使用 FQL 中的链接统计“表”: http://developers.facebook.com/docs/reference/fql/link_stat/
有没有更简单的方法,因为这似乎需要大量的工作来实现。
I'm using Facebook Likes in my site. I have a gallery page which shows picture/video data and the number of likes for that data. Each piece of data has it's own URL which can be liked.
However, I want to display the number of likes in the gallery navigation, but I don't want people to be able to "like" from the navigation. Is there a way to display the number of likes without the button?
The only way I've seen so far is using the link stat "table" from FQL: http://developers.facebook.com/docs/reference/fql/link_stat/
Is there an easier way because this seems like a fair amount of work to implement.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以:
1)自己通过facebook图表收集喜欢的数量,将它们保存在DB中,然后在没有FB的情况下自行显示。
示例:http://graph.facebook.com/http://www. huffingtonpost.com/
或更好:http:// graph.facebook.com/http%3A%2F%2Fwww.huffingtonpost.com%2F
返回:
因此 "likes": 15,
对于某些资源,您将需要访问令牌如有必要,请对您的网址进行 url 编码,因为这可能会导致复杂网址出现问题。
2)在iframe版本中显示点赞按钮,并在顶部放置另一个div,这样用户就无法与其交互,但我不建议这样做,因为当用户尝试点赞时,这可能会让他感到沮丧。 (用户已经习惯了他们可以点击这个)
我想第三种选择是每次显示页面时也使用图形 API 在客户端上获取 JavaScript 中的 Like 数量
You can :
1) collect the number of likes through the facebook graph yourself, save them in a DB and then display it on your own without FB.
Example : http://graph.facebook.com/http://www.huffingtonpost.com/
Or better : http://graph.facebook.com/http%3A%2F%2Fwww.huffingtonpost.com%2F
Which returns :
And thus "likes": 15,
For some ressources you will need an access token and url encode your url if necessary, as it could lead to problems with complex urls.
2) Display the like button in iframe version and put another div on top so that user cannot interact with it, but I wouldn't recommend that as It might frustrate your user when he will try to like. (Users are accustomed to the fact that they can click on this)
I guess a third option would be to fetch the number of like in Javascript on the client each time your display the page also using the graph api