Short ‘n Tweet for EE
![]()
This day in age it is very common to see websites with “Twitter” on it. If there is nothing linking to a Twitter account, the site is probably not being managed correctly. The short ‘n tweet expression engine plug-in is directed towards those who use the Expression Engine CMS (like this website), and want to be able to have readers retweet their posts very easily.
The first step to making this happen on your Expression Engine website is to download the plugin here :
http://devot-ee.com/add-ons/plugins/shortn-tweet/
Get Started
If you are new to Expression Engine, I would recommend really getting your feet wet with understanding how EE works before you dive into the Short ‘n Tweet plug-in. If you are an EE veteran, this should be an easy plugin-to implement into your site.
When I first started working with this plugin, I was lost as to where I should be putting the “shortntweet.php” file in my directories. It took me a while to figure it out, but you want to :
a] RENAME THE FILE from “shortntweet.php” to “pi.shortntweet.php”.
b] CREATE A FOLDER NAMED “shortntweet” in this location “site/system/expressionengine/third_party/shortntweet/”
c] PLACE THE “pi.shortntweet.php” IN THE NEW FOLDER.
Optional : Setup a bit.ly Account
Bit.ly is a fantastic resource for easily shortening your URL’s. So, instead of having a long URL in a tweet when someone retweet’s your post, bit.ly shortens it into a URL that is a bit more manageable and friendly to the character limit Twitter has on their tweets. Although its not required, I would certainly recommend implementing bit.ly into this plug-in. It’s very easy to do if you follow these steps :
a] Go to bit.ly (http://bit.ly/) and log in to your existing account (or create a new one).
b] Click on the “account” link in the top right of the bit.ly website.
c] In the “pi.shortntweet.php” file, enter your login and API Key in the appropriate fields.
example :
$login = ‘YOURBITLYLOGIN’; // enter your bit.ly login here
$apikey = ‘R_01234567890abcdefghijklmnopqrstu’; // enter your key here
Launch Short n’ Tweet
As it is documented in the “pi.shortntweet.php” file, all you need to do now is implement the Expression Engine specific code for the plug-in and you’re done. Of course, if you want to add custom graphics or alternate text to make the button a little more attractive, that is up to you. As you can see in all of my posts, I created a simple .png retweet button while utilizing this very useful plug-in. G’head - RT this article and test it out!