Customizing the Twitter button without using intents


#1

I want to use the twitter buttons so they appear like the ones on this page: https://twitter.com/about/resources/buttons#tweet. I need the look, and the count feature. I want exactly what the code below generates on a page:

<a href="https://twitter.com/share" 
   class="twitter-share-button" 
   data-url="http://bit.ly/twitter-api-announce" 
   data-counturl="http://groups.google.com/group/twitter-api-announce" 
   data-lang="en" 
   data-count="vertical">Tweet</a>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="https://platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>

Except, I want it to go to a different link than the generated “twitter.com/intent/session?.…” I want it to go to a starting page I have set up that uses the oauth mechanism to format & send the tweet.

I’m kind of inferring that replacing the data-counturl with my content page url will let the api keep track of the count, but don’t know what the data-url attribute is supposed to represent.


#2

You won’t be able to achieve this using Tweet Button resources ultimately – the counts aren’t provided as a public API. It’d also be unwise to provide an alternate experience with the Tweet Button that lead somewhere else – the Tweet Button user experience should be consistent wherever the Tweet Button is found.

If you want a user to use OAuth and authenticate your site to act on their behalf, then you should make that process clear and entirely separate from the Tweet Button product itself.


#3

That’s disappointing. I’m actually doing little more than the default functionality of the button, from the process POV. The reason I need to go the custom route is so I can use the update_with_media API to embed an image with the tweet. Nothing more.


#4