How to Integrate official tweet button to wordpress (no plugin)?

 

Few hours ago, @twitter has officially released their brand new tweet button for content publishers to share their content through twitter. @TweetMeme has Retweet button integration with a number of blogging platform which was also used previously in this website. Now codereflect.com is integrated with brand new tweet button to share the content.

image

Twitter supports 3 different kind of buttons so far which contains a tweet button and also a retweet count linked to a twitter search page, which can display the reteweets on this same URL.

The steps for creating the reteweet button is quite easy. With simple 3 steps your retweet button will be ready.

Head to http://twitter.com/tweetbutton

Choose your button type

image

The biggest advantage of twitter share option is, you can add a set of twitter account suggest to follow.

image

You’re done.

Now You’ve created a typical button for your website. But now let’s see how to integrate this to wordpress. The default tweet button can’t work with the dynamic post contents in the blog. But it has options to specify the felids to control all parameters associated with the tweet button and share window eventually appears on clicking it.

Head to Developer page to get more information about tweet button http://dev.twitter.com/pages/tweet_button

Here I’m talking about the javascript version of the tweet button. The parameters which can be passed to script are listed below

Data Source

Share query string

data- attribute of anchor tag

rel= attribute of a link tag

Default

Priority

1

2

3

4

URL to Tweet

url

data-url

rel="canonical"

HTTP Referrer

via user

via

data-via

rel="me"

 

Tweet text

text

data-text

 

Content of the <title> tag

Recommended accounts

related

data-related

   

Count box position

count

data-count

 

horizontal

Language

lang

data-lang

 

en

In addition to the default button HTML code generated, we may have to add some more parameters to enable it in wordpress hosted blog

Modify Index.php from Appearance->Editor option

image

Copy the generated HTML code between the iteration to display the post. The screenshot is attached above. You may have to add data-url and data-text parameter to enable tweet button specfically for each post in the blog post. You can simply call the php call to get the title and and link the URL

Modify the Singlepost.php from Apperance->Editor Menu

image

This is also done in the same fashion for PHP.

Finally the share window appear as follows. 

image

I’m not covered all the parameters listed for the tweet option. Please check the documentation it’s simple as it’s. There may be a better way for doing these things. I’m not an expert web programmer. Please share if you’ve any comments. Hope you enjoy this

 

Tweetie acquired by Twitter – Twitter for iPhone

 

If you would ask me, which is my favorite twitter app in iPhone/iPod Touch. There’s only one answer “Tweetie”. There are thousands of Twitter apps in this webworld. Most of them has new features than Tweetie, but Tweetie Remained as Tweetie and the favorite app for iPhone. Once if you use, you will never leave it. You will feel $2.99 is not really too much for it’s experience.

Now twitter becomes more serious about mobile experrience and the smartphones are on boom. They’ve simply acquired Tweetie instead of creating a new one. Now it’s known as “Twitter for iPhone”. See the announcement from Twitter.

We’re thrilled to announce that we’ve entered into an agreement with Atebits (aka Loren Brichter) to acquire Tweetie, a leading iPhone Twitter client. Tweetie will be renamed Twitter for iPhone and made free (currently $2.99) in the iTunes AppStore in the coming weeks. Loren will become a key member of our mobile team that is already having huge impact with device makers and service providers around the world. Loren’s work won the 2009 Apple Design Award and we will eventually launch Twitter for iPad with his help.


You can see full scoop here.