Shopping Cart (0)

Adding a Tweet Box to your site

1 Posted April 20, 2012 by Rockstar Frog Categories: Code Snippets

Both Windows and Mac are integrating social media platforms more and more into their systems – creating a new Tweet is just a click or two away. You can do this on your own website too by integrating with the Twitter Development platform. Today we’re going to cover how to add a “Tweet Box” to any page on your site.

This is what we’re going to create (as seen at the end of the checkout process on eFrogThemes.com)

It’s actually a very simple process. Let’s get started:

Firstly, you’re going to want to create a Twitter application. You can do this here: . Once you’ve created your app, you’ll be presented with a screen that details some key information about your application.

What you need to note down for the purposes of your Tweet Box, is just the ‘Consumer Key’.

Secondly we’re going to add the required code to 2 places in your site. Firstly, in the header you’ll want to include the Twitter Javascript library.

Enter your unique Consumer Key into the above snippet and add that before the close of your head tag.

Thirdly and lastly, wherever you want the actual Tweet Box to display, you’ll add the following:


And that’s that. Right out the box your Tweet Box will work perfectly.

Optionally, you might want to edit the styling of your Tweet Box – perhaps changing the color of the textarea, or adjusting the font and size of the heading. To do this, we’re going to add a style tag to the label. The final product would look as follows:


As the Javascript creates that Tweet Box then, the styling you’ve provided will be applied.

Hope you have fun inserting this Tweet Box into your own site. Let us know how you manage!

Comments

20/04/2012 1:56 pm
Guru Frog

I love nothing more than a great actionable blog post.

Thanks Rockstar!

Reply

Leave a Comment

George has something new to show you

Hello tadpoles! We're as happy and excited as a dog with two tails, to tell you about the latest theme from the team around the pond. It's called Cohesion, and we like to think of it as "a socially-engaged business theme". Read more

Valentines Giveaway: Win a copy of our new gorgeous theme – Occasions

Love is in the air, and lucky for you frogs aren't immune to Cupid's m... Read more

5 of George’s favorite WordPress plugins

Hello, tadpoles! Last week we released a global update to all our t... Read more

And the winners are….

Helloo, tadpoles! It's been a good Friday here at the pond, and it'... Read more

Twitter tweet and Facebook like. Magic.

Sharing is caring, right tadpoles? So today, we're going to show yo... Read more

eFrog News Categories

Browse our themes