Two years ago, Twitter launched Twitter Anywhere API which made it really easy for us to mention twitter usernames and have them be automatically linked to the right profile. It also allowed for beautiful hovercards with additional info. Sadly Twitter has decided to retire the Anywhere API on December 6th, 2012. Since we regularly mention userβs twitter handles in our post content, it only made sense to come up with a way to automatically link twitter usernames in WordPress. Instead of relying on a third-party script, we decided to write a short and simple plugin to take care of the job. In this article, we will show you how to automatically link twitter usernames in WordPress when you mention it after the @ sign like so: @pluginthemehub
All you have to do is open a blank .php file and call it wpb-twitlinks.php. Then copy the code below and save it in there. Upload the file into your plugins folder, and simply activate the plugin.
Note, since we only use this on our single post and pages, we only have the filter for the_content. You can always extend this feature to excerpts as well by adding the following line:
We are not saying that this is the only method that exists. There probably are bunch of jQuery solutions available. This is the fastest and most effective solution in our opinion.
How can you use it?
This service goes way beyond WordPress. You can select from one of the many available channels to automate your online life. You can automatically tweet your new posts. You can automatically share your new posts on facebook page or profile. You can pull posts from RSS into WordPress etc. Below is a list of few channels they have:
How to use IFTTT with WordPress?
Go toΒ IFTTTΒ and create your account. IFTTT works with all WordPress.org self-hosted blogs (version 3.x and above) and WordPress.com blogs as well. You MUST have XML-RPC enabled to work with IFTTT.
Go to Settings Β» Writing and enable XML-RPC
Once you have done that, you are ready to go and use WordPress as the trigger.
Possible Use Cases:
Below is a list of possible use cases with WordPress. For more look atΒ IFTTT WordPress Channel.
- WordPress to Facebook Fan Page
- WordPress to Facebook Profile
- WordPress to Twitter
- WordPress to Google+
- WordPress to Tumblr
- WordPress to Evernote
- WordPress to LinkedIn
- WordPress to Delicious
- WordPress to Blogspot (Blogger)
- WordPress to Diigo
- WordPress toΒ Buffer
- WordPress to DropBox (Backup each post)
- WordPress to Google Drive (Backup each post)
- WordPress to Flickr
- WordPress to Zootool
- WordPress toΒ Hootsuite
- WordPress to Google Calendar
- WordPress to Bitly
- WordPress to Instapaper
- WordPress to Read Later
- WordPress to SkyDrive (backup each post)
- WordPress to App.net
- WordPress to SMS
- WordPress to Phone Call
And the list could probably go on. By the way, a lot of those could be reversed in order as well. For example, RSS to WordPress, Twitter to WordPress, FB to WordPress etc.
Conclusion
IFTTT is a great tool, and we can see a lot of good coming out of it. Just from a list above, you can easily delete a few plugins that you may have running on your site and have IFTTT do those tasks. In what ways are you going to use IFTTT? Will you use IFTTT? Why or Why not. Let us know in the comments.