When sharebutton is enabled for teaser mode and there are 2 or more page/story items displayed, the sharebutton always find one specific (probably the first one) node to share, even when you click the sharebutton belongs to a different page/story.

Comments

markwk’s picture

It is probably linking to neither node but to the page you are on. This is actually just from the original code on Weibo:

url:location.href,

Replacing line 167 of weibo_sharebutton.module file to:

$output .= "url:$url, \n";

might fix this issue. Please test and report.

hszhai’s picture

It looked like "url:location.href" needs to stay as is, changing it could cause the sharebutton to completely disappear.
According the the document at open.weibo.com, the parameter "title" is what being shared, and it does default to the page where the sharebutton is. I have not figure out an easy way to retrieve the title and/or the beginning part of the text of the associated node for sharing purposes.

var param = {
url:location.href,
type:'3',
count:'1', /**是否显示分享数,1显示(可选)*/
appkey:'', /**您申请的应用appkey,显示分享来源(可选)*/
title:'', /**分享的文字内容(可选,默认为所在页面的title)*/
pic:'', /**分享图片的路径(可选)*/
ralateUid:'', /**关联用户的UID,分享微博会@该用户(可选)*/
rnd:new Date().valueOf()
}

markwk’s picture

For pulling the title is easier. I can just pull a variable from the node itself. Probably something like:

node->title

For making sure you have the correct url, I'll see about that one too.

I actually will using on this a Chinese site soon, but not on the teaser. I'll see I can get this to work.

Mark

markwk’s picture

Issue summary: View changes
Status: Active » Closed (won't fix)

Been a long time with no info so closing this.