Howdy! Thanks for coming and enjoy your stay! Take a look at the sitemap and don't forget to chirp!

Twitter Friendly Links

April 30th, 2009

Thank you for using Twitter Friendly Links.

Description

YouTube Preview Image

So, you promote your blog posts via Twitter, huh? Me too. And those long blog post URLs, ugh! Yeah, we got rid of those using URL shortening services like TinyURL and tr.im but what about the name and/or brand? Your blog posts might be fab – very interesting to read and three thousand comments on each. But are you getting people to remember your website address in Twitter? No. Do you get backlinks from Twitter using TinyURL? No. Can you measure site statistics from TinyURL links on Twitter? No.

Link Wisely, with WordPress

Link Wisely, with WordPress

Here’s a quick example:

http://kovshenin.com/wordpress/plugins/twitter-friendly-links/

Might look like this in Twitter:

http://kovshenin.com/712

Sweet huh? Here’s a features list:

  • Easy to install
  • Customizable shortened URL style
  • Switch between 302 and 301 redirects
  • You can have a list of all your posts/pages/attachments together with their Twitter Friendly URLs on one page (AJAX pagination)
  • Shows the short link in the edit post/page form together with the text you can tweet out (trimmed to 140 characters) and a link to Twitter with the predefined text
  • You can output the twitter friendly link in your themes using the twitter_link() function
  • Compatible with Sociable, Twitter Tools, Tweet This, SexyBookmarks and AskApache Google 404 plugins
  • Configurable linking relations (HTML and HTTP) for rel=shortlink and rel=canonical
  • Compatible with WordPress MU and BuddyPress
  • Super easy tracking with Google Analytics! Destination links are Taggable!
  • You can now switch to alphanumeric links for sexy links with numbers and letters like http://example.com/s2e7
  • Caching with .htaccess now available!
  • Even shorter links with customizable shortlink base!
  • Loads more yet to come

Screenshots

Download, changelog and other notes

Download link, changelog and other notes. Officially hosted in the WordPress.org Plugin Directory: Twitter Friendly Links. I also like when people with WordPress.org accounts vote it up ;) thanks!

Even Shorter!

The new version of Twitter friendly links includes a customizable shortlink base URL. This is used in case you want your twitter links to be on a different URL than your blog. This is useful when you run your blog on a www domain name but want your short links to be without the www to save some space. Changing the base URL is also useful when your domain is too long and you have a shorter one that you would like to use for twitter links, for instance if you own yandex.ru and ya.ru, you might host all your blog on yandex.ru, but your shortlinks would be ya.ru/123 which would redirect to the original post at yandex.ru.

Enabling this is fairly simple, no coding skills required. Both domains should use the same .htaccess file, thus you should direct your new domain (virtual host) to the same root folder as your old one.

Please supply any feedback to the comments section of this page. Pingbacks and trackbacks are appreciated too. Thanks for all your contribution.

Translations

405 Responses to “Twitter Friendly Links”

  1. Abe Mishler (@abemishler)

    Hi Konstantin,

    Great plugin. WP 3.0 supports new custom post types. I use the “Custom Post Type UI” plugin to add them. (http://webdevstudios.com/support/forum/custom-post-type-ui/)

    It would be great if your plugin would support custom post types too for short links.

    Great work,
    Abe

    • Abe Mishler (@abemishler)

      I see that it does work with custom types. Bravo.

      Best

      • kovshenin (@kovshenin)

        Wow haha :) Cool, I didn’t know it would :D

  2. ascetic

    thank you for this great plugin!

    I currently having a problem like this:
    my site permalink structure is= http://websitename.com/postid/postname/
    now I use the plugin to create a structure like= http://websitename.com/postid/

    but the main problem is, it doesn’t redirect correctly. when I click on the new twitter link, it stays on that link, not redirecting to the original permalink. so, I have two different accessible pages of the same post.

    is that an issue or is it suppose to run like that?

    thanks :)

    • kovshenin (@kovshenin)

      Not sure. Are you running the latest version?

  3. NTB

    I just found this plugin, and I’ll want to try it with my new WP3 MU setup.
    Is it possible to point my short link to an external site that is not hosted on my WordPress ?

    • kovshenin (@kovshenin)

      NTB, no. Why would you want to create short links to external websites? Are you trying to do another bit.ly clone? ;)

  4. Flo

    Hi there, I was wondering if it’s possible to somehow replace the permalink redirection for all Buddypress activity entries? Would be great, please let me know. Best, F.

    • kovshenin (@kovshenin)

      Flo, unfortunately I don’t know much about the internals of Buddypress yet..

  5. Could you add to your plugin the Tweet This WP Plugin’s URL Service and Tweet Text options? Thanks.

    • kovshenin (@kovshenin)

      Do they have filters or do I have to hi-jack them? ;) Last time I looked through Tweet This I had to manually hack it…

  6. Karsten (@krohn)

    Hi!
    I use 0.5 of your Plugin and WP 3.0.1. Works like charm with only one issue:
    In html-head, the link rel=shortcut is not formed the way I configured it in your plugin. (Yes, i checked “HTML Shortlink relation” on the configuration page).

    Is there a way to do that?

    Thank you for plugin and support!
    Karsten

  7. Angelo

    I noticed a conflict. it doesn’t work properly (almost for me) with lifestream plugin enabled. if I use the nuermic redirect it fails with the message “no posts matched your criteria”, if I change to alfanumeric, it works. if I disable lifestream, it works.

    wordpress 3.0.1, TWL plugin 0.5, lifestram plugin is this one: http://www.enthropia.com/labs/wp-lifestream/

  8. folks were arguing this over at the rerun site. it was in the first stages to become a heated discussion.

  9. Fidgetwith (@fidgetwith)

    I have found a bug (I think!) If you set an article to post at a certain time (scheduled) it comes up with an incorrect URL (always seems to link to the latest article).

  10. Esben Rasmussen (@EsbenRasmussen)

    Thanks for a great and promising plugin!

    I have a small feature request:

    At the moment it is possible to track via Google Analytics – but only on a very general basis.
    If I in the admin interface add “?utm_source=Twitter&utm_medium=Sociale-medier&utm_campaign=BlogPosts” as the tracking variable I will only be able to see people visiting my site from twitter because of my tweeted blog posts… However, I would like for it to be more precise and add the blog post title dynamically, so that the tracking will be uniqe for each blog post.

    I am not a programmer, but I have looked through your code and have found this “wp_redirect(get_permalink().$ga_tracking, $redirect);”.

    If I in the admin interface indicate “?utm_source=Twitter&utm_medium=Sociale-medier&utm_campaign=” as the tracking variable, what would I have to add to the code to achieve what I want?

    Something like this: “wp_redirect(get_permalink().$ga_tracking.ADD_POST_TITLE_HERE, $redirect);”

    My solution of course is only a hack – the feature request is that it is possible to select this as an option in the admin interface.

Including pingbacks & trackbacks

  1. You can be the first!