Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Twitter share button doesn't forward custom text

Tags:

button

twitter

I'm working on a website with twitter share option for each specific product.

I followed twitter API instructions for tweet-sharing, and everything works fine except custom display of text. For example I want user to tweet like this: "What do you think? Should I buy this? http://url.etc @mywebsite"

but all I get when user tweets is the link: http://url.etc

This is the code:

<script type="text/javascript" src="//platform.twitter.com/widgets.js"></script>
<a target="_blank" href="https://twitter.com/share" data-url="http://bit.ly/twitter-api-announce" data-via="testtest" data-text="What do you think? Should I buy this? " data-count="none" data-counturl="http://groups.google.com/group/twitter-api-announce" >TWITTER</a>

The problems seems to be with data-text option.

Any experience on this? Ideas? Thanks

like image 273
Slavisa Perisic Avatar asked Nov 11 '11 11:11

Slavisa Perisic


1 Answers

On Wordpress I just used <a href="https://twitter.com/share?url=google.com&text=your text here">Tweet</a>

Works like a charm!

like image 169
lostkat Avatar answered Nov 15 '22 10:11

lostkat