Support » Plugins » Tweet This, a WordPress Plugin for Twitter

  • I’ve created a plugin called Tweet This, which lets your readers link to your posts in a Twitter tweet easily. It even pre-trims the URLs, so they have plenty of space to write without going to TinyURL or another redirection service manually.

    Tweet This, a WordPress Plugin for Twitter [1.8.3]

    Here’s the long description:

    Adds a Twitter icon to every post and page, with a nice rollover effect. URL trimming by If logged in, the reader will find the tweet box pre-filled with “www.***** “. No configuration options. The icon appears at the top-right of each post.

    Normally, posting a link to Twitter eats up your 140 characters. Though they shorten URLs with TinyURL, it doesn’t happen till after you post your tweet, so you don’t have many characters to work with.

    While you could go to, copy and paste the blog post’s permalink, shorten the URL, copy that new URL, go to Twitter, and paste it into the box, this plugin merges all that into one step, using the Twitter API (a.k.a. an HTTP GET request) and, an external URL trimming service I created. I didn’t like how long TinyURL’s URLs are, so I made Its URLs are 16 characters instead of TinyURL’s 25, giving you more space to write about the blog post. I use the www. prefix instead of http://, which saves three characters. Twitter picks up on it fine.

    This plugin fetches a shortened URL from for each of your blog posts’ permalinks server-side, then displays a link to Twitter for each post, with a cute icon.

    Released under Version 3 of the GNU General Public License:

Viewing 11 replies - 1 through 11 (of 11 total)
  • This plugin is at version 1.1.1 now, and it’s a lot more efficient (caches URLs) and has good configuration options. Get it here:

    Tweet This, a WordPress Plugin for Twitter [1.8.3]

    or here:

    Nice plugin. Thanks. Just headsup, I hacked it a little bit, but you might want incorporate this idea in the next version. I’d want to be able to search for when people tweeted my blog links so I just hacked in a reply @ my twitter name (tixrus) to the beginning of the link. Now instead of

    http://www.shorturl/2323242 My Awseome Blog Post Title


    via @tixrus http://www.shorturl/2323242 My Awseome Blog Post Title

    I just hard coded mine, but obviously it would be better if
    this was something configurable in the settings.

    Thanks again for this very useful plugin. 🙂

    @tixrus I added that in the new version 1.2. You can specify whatever text you want before or after the URL or title.

    I’ve tried to install this several times, and without changing any of the default setting, continually get the follow warning message, which also shows up at the top of my posts on the live site! I’m not sure if I need to edit the code, or move a file to another folder. I’m not an MU user and have tried both downloading directly from (the new version of) WP and downloading and uploading it it to the server separately.

    Warning: file_get_contents() [function.file-get-contents]: URL file-access is disabled in the server configuration in /mnt/local/home/katebb/ on line 39

    Warning: file_get_contents( [function.file-get-contents]: failed to open stream: no suitable wrapper could be found in /mnt/local/home/katebb/ on line 39

    @katebb That happens if allow_url_fopen is disabled; try out version 1.3.9 which switches to curl if so, or uses local URLs if both are disabled. You shouldn’t get that error message anymore.

    Hi Richard!

    Thanks for this GREAT plugin!
    I really like it!

    It’s almost perfect, all that’s missing is the option for the
    Twitter page to open in a new window instead of in the same
    window as the blog. 🙂

    Thanks once again!


    richardxthripp – thanks for the great plugin. A quick questions – I’m using the <?php tweet_this_small(); ?> snippet to customize where the icon and link show. For some reason, the icon is showing up higher than the link (it looks messed up). Is there a way (through css etc.) to adjust the icon where it’s lined up with the text – to lower the icon? Thanks for any suggestions.


    You really should add an ‘open in a new window’ option. This is a deciding factor for me on whether to use the plugin or not.

    Does anyone have any idea on how I can modify tweet-this.php to get it to open in new window?

    I just added “Tweet this” to my word press blog and I cannot find the setting to configure it. They are not highlighted in blue like other pluggins. It shows up on my blog fine but when I click on it to tweet the blog, it bounces to the twitter login page and then bounces out almost immediately. I am sure there is a simple fix for this.
    I am using WP ver. 2.7.1



    This plugin is unstable, it makes 4 of my websites go down, i mean, frontpage is gone. But when i remove it i can again access frontpage.

    So its obvious that this plugin is not safe.

    A dumb inefficient MySQL query on the home page cooked my server, and since is the default URL shortener everything was timing out. I stripped of URL lists and hit counters so it’s more like / TinyURL and less like I also released version 1.4 of the plugin a few minutes ago which improves the speed a lot. Tweet This has been getting more negative than positive feedback because of these glaring issues, but I’m hoping to turn this around now.

    ALSO: latest version adds open in new window option.

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Tweet This, a WordPress Plugin for Twitter’ is closed to new replies.