Introducing the Tweet Button

104 views
Skip to first unread message

themattharris

unread,
Aug 12, 2010, 11:28:01 AM8/12/10
to Twitter Development Talk
Hey everyone,

Today we’re launching the Tweet Button to make it easy for your users
to share your website with their followers. When they click on the
Tweet Button, a Tweet box will appear pre-populated with a message and
link chosen by you. Once they have sent a Tweet they can choose to
follow accounts recommended by you. All of this happens on your
website, so the user never has to leave.

You have complete control over the suggested text of the Tweet Button,
who the Tweet should be attributed to and recommendations of who to
follow. All of this is possible through a line of javascript and a few
URL parameters or data attributes of a link.

To add this to your own site grab it from http://twitter.com/tweetbutton,
or create your own using our developer documentation,
http://dev.twitter.com/pages/tweet_button

Read more about the Tweet Button on our blog,
http://blog.twitter.com/2010/08/pushing-our-tweet-button.html

Best
Matt

--


Matt Harris
Developer Advocate, Twitter
http://twitter.com/themattharris

nischalshetty

unread,
Aug 12, 2010, 11:42:13 AM8/12/10
to Twitter Development Talk
Awesome! Looks good and so many customizations while still being
simple and easy to configure makes it a winner!

-Nischal

On Aug 12, 8:28 pm, themattharris <thematthar...@twitter.com> wrote:
> Hey everyone,
>
> Today we’re launching the Tweet Button to make it easy for your users
> to share your website with their followers. When they click on the
> Tweet Button, a Tweet box will appear pre-populated with a message and
> link chosen by you. Once they have sent a Tweet they can choose to
> follow accounts recommended by you. All of this happens on your
> website, so the user never has to leave.
>
> You have complete control over the suggested text of the Tweet Button,
> who the Tweet should be attributed to and recommendations of who to
> follow. All of this is possible through a line of javascript and a few
> URL parameters or data attributes of a link.
>
> To add this to your own site grab it fromhttp://twitter.com/tweetbutton,
> or create your own using our developer documentation,http://dev.twitter.com/pages/tweet_button
>
> Read more about the Tweet Button on our blog,http://blog.twitter.com/2010/08/pushing-our-tweet-button.html

Clint Ecker

unread,
Aug 12, 2010, 2:30:04 PM8/12/10
to twitter-deve...@googlegroups.com
On Thu, Aug 12, 2010 at 10:28 AM, themattharris
<themat...@twitter.com> wrote:
> Today we’re launching the Tweet Button to make it easy for your users
> to share your website with their followers. When they click on the
> Tweet Button, a Tweet box will appear pre-populated with a message and
> link chosen by you. Once they have sent a Tweet they can choose to
> follow accounts recommended by you. All of this happens on your
> website, so the user never has to leave.

Hi Matt,

I'd really like to use this on Ars Technica, but it seems to force the
t.co shortener on us. We have our own shorturl system (arst.ch) and I
need to use that. Can you explain how I might go about doing
that—I've scoured the docs and have seen no mention of custom Short
URLs.

Thanks!
Clint

Abraham Williams

unread,
Aug 12, 2010, 3:18:43 PM8/12/10
to twitter-deve...@googlegroups.com
Clint,

Include a data-url attribute in the <a> element. It will get wrapped in a t.co but the user will still hit the arst.ch domain.

<a href="http://twitter.com/share" class="twitter-share-button" data-url="http://arst.ch/xyz" data-count="vertical" data-via="abraham">Tweet</a><script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script>

Abraham
-------------
Abraham Williams | Hacker Advocate | http://abrah.am
@abraham | http://projects.abrah.am | http://blog.abrah.am
This email is: [ ] shareable [x] ask first [ ] private.

Matt Harris

unread,
Aug 12, 2010, 3:44:28 PM8/12/10
to twitter-deve...@googlegroups.com
Hi Clint,

The Tweet Button will wrap any URL sent to it as a t.co link so although you can use your own shortener we will still create a t.co link for it. We don't unwrap the short URL, so any analytics you have attached to your shortener can still happen. We also return the URL you sent us with our API responses so clients can display your URL whilst linked to t.co first. This is made possible by passing the flag include_entities=1 to any method that returns a status.

You can learn more about t.co here:

Hope that helps,
Matt

M. Edward (Ed) Borasky

unread,
Aug 12, 2010, 4:56:20 PM8/12/10
to twitter-deve...@googlegroups.com, Matt Harris
That brings up an interesting question. Can we access t.co analytics
now, either (preferably) for free or by paying Twitter? If not, when,
if ever, will we be able to access t.co analytics?
--
M. Edward (Ed) Borasky
http://borasky-research.net http://twitter.com/znmeb

"A mathematician is a device for turning coffee into theorems." - Paul Erdos

artesea

unread,
Aug 13, 2010, 9:12:17 AM8/13/10
to Twitter Development Talk
Anyone else getting the count to work? Had several people press the
button and it still shows zero, and when clicking on the zero it takes
me to the search page containing their tweet, plus our autotweet
everytime we do a blog post.

Also will you be counting all tweets containing the URL, or only those
via the button?

Cheers
Ryan

On Aug 12, 4:28 pm, themattharris <thematthar...@twitter.com> wrote:
> Hey everyone,
>
> Today we’re launching the Tweet Button to make it easy for your users
> to share your website with their followers. When they click on the
> Tweet Button, a Tweet box will appear pre-populated with a message and
> link chosen by you. Once they have sent a Tweet they can choose to
> follow accounts recommended by you. All of this happens on your
> website, so the user never has to leave.
>
> You have complete control over the suggested text of the Tweet Button,
> who the Tweet should be attributed to and recommendations of who to
> follow. All of this is possible through a line of javascript and a few
> URL parameters or data attributes of a link.
>
> To add this to your own site grab it fromhttp://twitter.com/tweetbutton,
> or create your own using our developer documentation,http://dev.twitter.com/pages/tweet_button
>
> Read more about the Tweet Button on our blog,http://blog.twitter.com/2010/08/pushing-our-tweet-button.html

James Jones

unread,
Aug 13, 2010, 9:30:15 AM8/13/10
to twitter-deve...@googlegroups.com
getting cert errors now

On 13/08/10 9:12 AM, artesea wrote:
> Anyone else getting the count to work? Had several people press the
> button and it still shows zero, and when clicking on the zero it takes
> me to the search page containing their tweet, plus our autotweet
> everytime we do a blog post.
>
> Also will you be counting all tweets containing the URL, or only those
> via the button?
>
> Cheers
> Ryan
>
> On Aug 12, 4:28 pm, themattharris<thematthar...@twitter.com> wrote:
>
>> Hey everyone,
>>

>> Today we�re launching the Tweet Button to make it easy for your users

Taylor Singletary

unread,
Aug 13, 2010, 10:06:16 AM8/13/10
to twitter-deve...@googlegroups.com
We had some caching/rate limiting issues related to tweet counts for a portion of yesterday but these should be relieved now. Please let us know if you continue seeing the zero counts after a reasonable amount of time (they won't update instantaneously).

Taylor Singletary

unread,
Aug 13, 2010, 10:07:14 AM8/13/10
to twitter-deve...@googlegroups.com
Hi James,

Can you share more about your certificate issues? Can you share some URLs where we can investigate or if you're implementing it yourself, the particulars of your configuration?

Thanks,
Taylor

On Fri, Aug 13, 2010 at 6:30 AM, James Jones <ja...@freedomnet.co.nz> wrote:
getting cert errors now


On 13/08/10 9:12 AM, artesea wrote:
Anyone else getting the count to work? Had several people press the
button and it still shows zero, and when clicking on the zero it takes
me to the search page containing their tweet, plus our autotweet
everytime we do a blog post.

Also will you be counting all tweets containing the URL, or only those
via the button?

Cheers
Ryan

On Aug 12, 4:28 pm, themattharris<thematthar...@twitter.com>  wrote:
 
Hey everyone,

Today we’re launching the Tweet Button to make it easy for your users

James Jones

unread,
Aug 13, 2010, 12:49:43 PM8/13/10
to twitter-deve...@googlegroups.com
why when I click on the count it will send me to the search for both the
url of the page and the base url?

On 13/08/10 9:12 AM, artesea wrote:

> Anyone else getting the count to work? Had several people press the
> button and it still shows zero, and when clicking on the zero it takes
> me to the search page containing their tweet, plus our autotweet
> everytime we do a blog post.
>
> Also will you be counting all tweets containing the URL, or only those
> via the button?
>
> Cheers
> Ryan
>
> On Aug 12, 4:28 pm, themattharris<thematthar...@twitter.com> wrote:
>
>> Hey everyone,
>>

>> Today we�re launching the Tweet Button to make it easy for your users

Peter Denton

unread,
Aug 13, 2010, 1:38:38 PM8/13/10
to twitter-deve...@googlegroups.com
sorry if this has been asked, and did not see on the documentation.

Can we see a global views of shares from our account? i.e. if Ive set up the via paramter, can I then see counts for that account?

On Fri, Aug 13, 2010 at 9:49 AM, James Jones <ja...@freedomnet.co.nz> wrote:
why when I click on the count it will send me to the search for both the url of the page and the base url?


On 13/08/10 9:12 AM, artesea wrote:
Anyone else getting the count to work? Had several people press the
button and it still shows zero, and when clicking on the zero it takes
me to the search page containing their tweet, plus our autotweet
everytime we do a blog post.

Also will you be counting all tweets containing the URL, or only those
via the button?

Cheers
Ryan

On Aug 12, 4:28 pm, themattharris<thematthar...@twitter.com>  wrote:
 
Hey everyone,

Today we’re launching the Tweet Button to make it easy for your users

to share your website with their followers. When they click on the
Tweet Button, a Tweet box will appear pre-populated with a message and
link chosen by you. Once they have sent a Tweet they can choose to
follow accounts recommended by you. All of this happens on your
website, so the user never has to leave.

You have complete control over the suggested text of the Tweet Button,
who the Tweet should be attributed to and recommendations of who to
follow. All of this is possible through a line of javascript and a few
URL parameters or data attributes of a link.

To add this to your own site grab it fromhttp://twitter.com/tweetbutton,
or create your own using our developer documentation,http://dev.twitter.com/pages/tweet_button

Read more about the Tweet Button on our blog,http://blog.twitter.com/2010/08/pushing-our-tweet-button.html

Best
Matt

--

Matt Harris
Developer Advocate, Twitterhttp://twitter.com/themattharris
   



--
Peter Denton
Co-Founder, Product Marketing
www.mombo.com
cell: (206) 427-3866
twitter @Mombo_movies
twitter - personal: @petermdenton

bruce

unread,
Aug 13, 2010, 2:07:35 PM8/13/10
to Twitter Development Talk
I'd like a way to add this to my google site(s), but google is trying
to
"protect" me from the referenced .js - any way around this?

On Aug 12, 10:28 am, themattharris <thematthar...@twitter.com> wrote:
> Hey everyone,
>
> Today we’re launching the Tweet Button to make it easy for your users
> to share your website with their followers. When they click on the
> Tweet Button, a Tweet box will appear pre-populated with a message and
> link chosen by you. Once they have sent a Tweet they can choose to
> follow accounts recommended by you. All of this happens on your
> website, so the user never has to leave.
>
> You have complete control over the suggested text of the Tweet Button,
> who the Tweet should be attributed to and recommendations of who to
> follow. All of this is possible through a line of javascript and a few
> URL parameters or data attributes of a link.
>
> To add this to your own site grab it fromhttp://twitter.com/tweetbutton,
> or create your own using our developer documentation,http://dev.twitter.com/pages/tweet_button
>
> Read more about the Tweet Button on our blog,http://blog.twitter.com/2010/08/pushing-our-tweet-button.html

Vincent Miller

unread,
Aug 14, 2010, 11:18:00 AM8/14/10
to Twitter Development Talk
I'm having several issues.
Tweet counts are now displaying, but I'm guessing you're caching the
count on the users browser as I can see 3 different counts in 3
different browsers atm. How long is this cached on client? Refreshing
does not update, and my firefox still shows the count it saw last
night.

I'm using the urlencoded method with the js.
Tested iframe version with same results.

Also, and this one is big...
I'm playing with them on forums, and the only page I see counts is on
index (domain.com, no dyn url). The buttons on viewfourm and viewtopic
(which have dynamic urls) never display a count. Is there some issue
with dyn urls and the button? The tco wrapped links resolve to the
pages properly, but counts never appear to go up.

When testing the button using the tweet button page on twitter, the
count increases. I can go back and set url in it again and.... the
count shows the updated count? Clearly the js being used on the
twitter site itself differs from the widgets.js. Is there an update to
that widgets.js coming?

I'd love to use these instead of third party buttons, but exactly what
is going on lol.

Fabien Penso

unread,
Aug 14, 2010, 5:29:55 PM8/14/10
to twitter-deve...@googlegroups.com
On Fri, Aug 13, 2010 at 4:06 PM, Taylor Singletary
<taylorsi...@twitter.com> wrote:
> We had some caching/rate limiting issues related to tweet counts for a
> portion of yesterday but these should be relieved now. Please let us know if
> you continue seeing the zero counts after a reasonable amount of time (they
> won't update instantaneously).

I feel like still having the issue at
http://tweetsell.it/users/wineheadlines/products/21170418193 (for
example).

It's also very disturbing to have the counter incrementing when
tweeting about the link, then going back to 0 when you reload the
page. Will you try to update this instantaneously later?

Jonathan Strauss

unread,
Aug 16, 2010, 12:39:31 PM8/16/10
to Twitter Development Talk
I just posted a WP plugin that uses the dataurl attribute to make the
tweet button work with awe.sm, bit.ly, su.pr, and tinyurl:
http://wordpress.org/extend/plugins/tweet-button-with-shortening/

It also allows multi-author blogs to automatically add the post author
to the recommended users screen after the tweet.

Clint Ecker

unread,
Aug 18, 2010, 2:00:52 PM8/18/10
to twitter-deve...@googlegroups.com, taylorsi...@twitter.com
Taylor,

We're seeing 0-tweet counts on every article on Ars. I've literally
never seen anything by a 0-count on any article since you released the
button.

People are tweeting these links, so I'm pretty sure there's clicks:

http://search.twitter.com/search?q=http%3A%2F%2Ft.co%2Fg3kPchF

Clint

Jonathan Strauss

unread,
Aug 18, 2010, 7:52:21 PM8/18/10
to Twitter Development Talk
Yeah, we've been seeing similar issues for awe.sm-powered links (on
>400 domains).

It would seem that Twitter's counter is only indexing *some* redirect
URLs. There are other folks complaining about this issue on this
thread:
http://groups.google.com/group/twitter-development-talk/browse_thread/thread/ed8bf9ded82fd5ca

Still waiting on official acknowledgment from Twitter, but it's a real
issue being experienced by a bunch of publishers trying to use their
own custom redirect links.

-jonathan

--
Jonathan Strauss, Co-Founder
http://snowballfactory.com

Campaign tracking for social media - http://awe.sm
A smarter way to update Facebook from Twitter - http://tweetpo.st
Sharecount button for Facebook - http://www.fbshare.me


On Aug 18, 11:00 am, Clint Ecker <clintec...@gmail.com> wrote:
> Taylor,
>
> We're seeing 0-tweet counts on every article on Ars.  I've literally
> never seen anything by a 0-count on any article since you released the
> button.
>
> People are tweeting these links, so I'm pretty sure there's clicks:
>
> http://search.twitter.com/search?q=http%3A%2F%2Ft.co%2Fg3kPchF
>
> Clint
>
> On Fri, Aug 13, 2010 at 9:06 AM, Taylor Singletary
>
>
>
> <taylorsinglet...@twitter.com> wrote:
> > We had some caching/rate limiting issues related to tweet counts for a
> > portion of yesterday but these should be relieved now. Please let us know if
> > you continue seeing the zero counts after a reasonable amount of time (they
> > won't update instantaneously).
>

felipe.lavin

unread,
Aug 20, 2010, 10:58:57 PM8/20/10
to Twitter Development Talk
Hi. I've been trying to create my own TweetButton links (something
like http://dev.twitter.com/pages/tweet_button#build-your-own-tweet-button)
and load them on a lightboxed iframe, using Fancybox (http://
fancybox.net/) but I'm getting an error that won't let me actually use
the TweetButton -- you can see an example on
http://beta.yukei.net/2010/06/trabajar-con-fechas-en-javascript/ (work-
in-progress)

It seems the error it's caused by a jQuery detection and livequery
function about the end of scribe.js, which is loaded in the
TweetButton page... there you have this code (beautified for better
reading):

if (window.jQuery) {
(function (A) {
A.extend(A.fn, {
scribe: function (B, D, C) {
C = C || {};
A(this).bind(C.clientEvent || "mousedown", function (E) {
window.scribe.call(this, B, D, C, E)
});
return this
}
})
})(jQuery);
(function (A) {
A("a.ab-reloading").livequery(function () {
watchReloadingABLink(A(this))
})
})(jQuery)
};

So, since I'm on an iframe, it correctly detects jQuery, but since I'm
not using the livequery plugin, the second function fails and nothing
is displayed on the iframe. Any way around this? Bug fix coming?

Thanks!

On 12 ago, 11:28, themattharris <thematthar...@twitter.com> wrote:
> Hey everyone,
>
> Today we’re launching theTweetButtonto make it easy for your users
> to share your website with their followers. When they click on theTweetButton, aTweetbox will appear pre-populated with a message and
> link chosen by you. Once they have sent aTweetthey can choose to
> follow accounts recommended by you. All of this happens on your
> website, so the user never has to leave.
>
> You have complete control over the suggested text of theTweetButton,
> who theTweetshould be attributed to and recommendations of who to
> follow. All of this is possible through a line of javascript and a few
> URL parameters or data attributes of a link.
>
> To add this to your own site grab it fromhttp://twitter.com/tweetbutton,
> or create your own using our developer documentation,http://dev.twitter.com/pages/tweet_button
>
> Read more about theTweetButtonon our blog,http://blog.twitter.com/2010/08/pushing-our-tweet-button.html

Matt Harris

unread,
Aug 24, 2010, 3:07:45 AM8/24/10
to twitter-deve...@googlegroups.com
Hey everyone,

I've updated the Tweet Button docs today with information which I hope
will answer a number of your questions. In particular the example
about using a short URL with the parameter data-counturl should help
those of you whose counts are staying at 0.
http://dev.twitter.com/pages/tweet_button#using-shorturl

For reference the documentation URLs are:
http://dev.twitter.com/pages/tweet_button
and
http://dev.twitter.com/pages/tweet_button_faq

Hope that helps,
Matt

Reply all
Reply to author
Forward
0 new messages