Fix FB share button link

This commit is contained in:
Manson Wang 2013-11-19 15:21:14 +08:00
parent b5d1809523
commit 9837dd8f69
1 changed files with 3 additions and 1 deletions

View File

@ -8,7 +8,9 @@ window.SocialShareButton =
title = encodeURIComponent($(el).parent().data('title')) title = encodeURIComponent($(el).parent().data('title'))
img = encodeURIComponent($(el).parent().data("img")) img = encodeURIComponent($(el).parent().data("img"))
fb_url = encodeURIComponent($(el).parent().data("fb_url")) fb_url = encodeURIComponent($(el).parent().data("fb_url"))
summary = encodeURIComponent($(el).parent().data("summary"))
url = encodeURIComponent(location.href) url = encodeURIComponent(location.href)
console.log($(el).parent().data())
switch site switch site
when "weibo" when "weibo"
SocialShareButton.openUrl("http://v.t.sina.com.cn/share/share.php?url=#{url}&pic=#{img}&title=#{title}&content=utf-8") SocialShareButton.openUrl("http://v.t.sina.com.cn/share/share.php?url=#{url}&pic=#{img}&title=#{title}&content=utf-8")
@ -17,7 +19,7 @@ window.SocialShareButton =
when "douban" when "douban"
SocialShareButton.openUrl("http://www.douban.com/recommend/?url=#{url}&title=#{title}&image=#{img}") SocialShareButton.openUrl("http://www.douban.com/recommend/?url=#{url}&title=#{title}&image=#{img}")
when "facebook" when "facebook"
SocialShareButton.openUrl("http://www.facebook.com/sharer.php?t=#{title}&u=#{fb_url}") SocialShareButton.openUrl("http://www.facebook.com/sharer.php?s=100&p[title]=#{title}&p[url]=#{fb_url}&p[images][0]=#{img}")
when "qq" when "qq"
SocialShareButton.openUrl("http://sns.qzone.qq.com/cgi-bin/qzshare/cgi_qzshare_onekey?url=#{url}&title=#{title}&pics=#{img}") SocialShareButton.openUrl("http://sns.qzone.qq.com/cgi-bin/qzshare/cgi_qzshare_onekey?url=#{url}&title=#{title}&pics=#{img}")
when "tqq" when "tqq"