【发布时间】:2011-12-07 02:55:41
【问题描述】:
我在我们的网站上使用 JQuery Gallerific 相册。 http://www.twospy.com/galleriffic/example-5.html
我想在这个页面上实现 Facebook Like 按钮和 Open Graph 协议。
facebook 喜欢按钮
<fb:like href="http://www.twospy.com/galleriffic/example-5.html" layout="button_count"></fb:like>
开放图协议
<meta property="og:url" content="http://www.twospy.com/galleriffic/example-5.html"/>
<meta property="og:image" content="http://farm4.static.flickr.com/3261/2538183196_8baf9a8015_s.jpg"/>
我想在用户点击下一个按钮和上一个按钮时将 og:url 和 og:image 链接更改为相应的页面链接。
假设用户点击第 5 张图片,那么开放图协议链接应更改为
<meta property="og:url" content="http://www.twospy.com/galleriffic/example-5.html#5"/>
<meta property="og:image" content="http://farm4.static.flickr.com/3150/2538167224_0a6075dd18_s.jpg" />
和like按钮需要改为
<fb:like href="http://www.twospy.com/galleriffic/example-5.html#5" layout="button_count"></fb:like>
请让我知道这是否可能。解决这个问题将挽救我的生命。请帮我写代码。
谢谢。
【问题讨论】:
-
您使用的是服务器端语言吗?如果有,是哪一个?
-
您好 Karim79,该页面是 html 页面。我不打算为此页面使用任何服务器端语言。是否可以使用 jquery 和 javascript 来解决这个问题。