Fix FB share button link
This commit is contained in:
parent
b5d1809523
commit
9837dd8f69
|
@ -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"
|
||||||
|
|
Loading…
Reference in New Issue