Facebook的Like按钮,可以将其设置为只读? [英] Facebook Like button, can it be made read only?
问题描述
我使用Facebook的喜欢在我的网站。我有一个画廊页,显示图像/视频数据和喜欢该数据的数量。每一块数据都有它自己的URL可以喜欢。
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?
到目前为止,我所看到的是使用链路统计表,从FQL的唯一方法:< A HREF =http://developers.facebook.com/docs/reference/fql/link_stat/相对=nofollow> http://developers.facebook.com/docs/reference/fql/link_stat/
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.
推荐答案
您可以:
1)收集通过Facebook的喜欢的数量绘制自己,并将它们保存在一个数据库,然后在显示它您自己没有FB。
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.
例如:的http://图。 facebook.com/http://www.huffingtonpost.com/
或者更好的http://graph.facebook.com/http%3A%2F%2Fwww.huffingtonpost.com%2F
将返回:
{
"id": "141265189223470",
"name": "The Huffington Post - Breaking News and Opinion",
"picture": "http://profile.ak.fbcdn.net/hprofile-ak-snc4/188056_141265189223470_1131566_s.jpg",
"link": "http://www.huffingtonpost.com/",
"category": "Personal blog",
"likes": 15,
"website": "http://www.huffingtonpost.com/",
"description": "Breaking News and Opinion"
}
和这样的喜欢:15日
对于一些ressources,您将需要一个访问令牌,并在必要时URL编码您的网址,因为它可能会导致与复杂的URL的问题。
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)显示在IFRAME版本类似按钮,并把另一个div在顶部,该用户不能与它进行交互,但我不会建议,因为它可能会阻碍你的用户的时候,他会尽力就好。 (用户已经习惯了这样的事实,他们可以点击这个)
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)
我想第三个办法是每次在客户机上取在Javascript像数的还使用图形API显示的页面
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
这篇关于Facebook的Like按钮,可以将其设置为只读?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!