From 9837dd8f694a7d7fa5db5f461203c5c805dddd02 Mon Sep 17 00:00:00 2001 From: Manson Wang Date: Tue, 19 Nov 2013 15:21:14 +0800 Subject: [PATCH] Fix FB share button link --- app/assets/javascripts/lib/social-share-button.coffee | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/assets/javascripts/lib/social-share-button.coffee b/app/assets/javascripts/lib/social-share-button.coffee index cec9fcbc4..fa28a872b 100644 --- a/app/assets/javascripts/lib/social-share-button.coffee +++ b/app/assets/javascripts/lib/social-share-button.coffee @@ -8,7 +8,9 @@ window.SocialShareButton = title = encodeURIComponent($(el).parent().data('title')) img = encodeURIComponent($(el).parent().data("img")) fb_url = encodeURIComponent($(el).parent().data("fb_url")) + summary = encodeURIComponent($(el).parent().data("summary")) url = encodeURIComponent(location.href) + console.log($(el).parent().data()) switch site when "weibo" 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" SocialShareButton.openUrl("http://www.douban.com/recommend/?url=#{url}&title=#{title}&image=#{img}") 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" SocialShareButton.openUrl("http://sns.qzone.qq.com/cgi-bin/qzshare/cgi_qzshare_onekey?url=#{url}&title=#{title}&pics=#{img}") when "tqq"