Problems, need help? Have a tip or advice? Post it here.
5 posts Page 1 of 1
Just having an issue with using a tweet button on a CouchCMS blog.

The tweet button works, but it only picks up the domain name, not the full url to the article.

Any ideas?

Example is here:


Hi webecho, nice website. I believe you need to make use of twitter's specified data-url parameter. The documentation is here by the way:

Current Code
Code: Select all
<a onClick="_gaq.push(['_trackEvent', 'Twitter', 'Tweet', 'Footer']);" href="" class="twitter-share-button" data-hashtags="winemaking">Tweet</a>

Fixed Code?
Code: Select all
<a onClick="_gaq.push(['_trackEvent', 'Twitter', 'Tweet', 'Footer']);" href="" class="twitter-share-button" data-url="<cms:show k_page_link />" data-hashtags="winemaking">Tweet</a>
Strangely, placing the exact code you have in your page on my test site works perfectly :)
So, for some reason, Twitter's JavaScript code fails to recognize the current page's URL on your setup.
I agree with @cheesypoof that in this case, we can lend it a helping hand by specifying the URL ourselves the way he showed.

Let us know if it helps.
Thanks cheesypoof.
I'll give that a try.
Glad you like the site too :)

KK - yeah, I've tried it on a couple of others on my localhost server and it works correctly.
When you hover over the link it shows the referrer url as the individual page, but the displayed url is just the domain.

Will try it in the morning and post the results here - hopefully it will do the trick

Thanks guys, appreciate the help.

Thanks Cheesypoof - it worked perfectly.
Next fix is getting the SEO friendly URL's working - will start a separate thread though KK

thanks guys

5 posts Page 1 of 1

Who is online

In total there are 17 users online :: 0 registered, 0 hidden and 17 guests
(based on users active over the past 5 minutes)

Users browsing this forum: No registered users and 17 guests