Update: Twitter is turning off @anywhere API on Dec. 6th, 2012. Here is more details.
Step 1: Registering an API
Before you can add the anywhere platform on your site, you need to register an API. You will be prompted to a page which would look like this:
Once you register, you should receive an API key. Next thing you want to make sure is that the permission level is set to Read and Write, otherwise users would not be able to click the follow button. This is a glitch with twitter, but they are working on it to fix this. But to stay on the safe side, we will provide the directions on how to do this.
First click on the link http://twitter.com/oauth. On this page, you will see the application that you registered. Click on your application’s name, and it should take you to the application details page. There is a button called “Edit Application Settings”. Click on this button to go to the edit page where you will need to scroll down to the item labeled “Default Access type”. Change this to “Read & Write”.
Step 2: Implementing it on your site
Remember to add your API key where it says YourAPIKey in the link.
Now lets take a look at the individual features this platform can do for you.
Auto-Link all Twitter usernames
Auto-Link all Twitter usernames with a Hovercard
This feature auto-links all twitter usernames found on the page, and it also provides a hovercard on a mouseover effect. So when your site’s user bring the mouse over to a username like @wpbeginner they will see a hoverbox like shown in the example above. If they click the follow button, then they can directly follow the user from your website. To enable this function, simply paste the following code in your site’s header below the main script.
Smart Follow Buttons for Twitter
Smart follow button lets your user follow your account directly from your site. You can create buttons for your site and use them in your post or anywhere else. See the live example below:
To add this type of button your site, first paste the following code in your site’s header below the main script:
Second, you need to add the following div tag where you want this button to show:
Remember to change wpbeginner to your username otherwise it will show a follow link to our twitter account.
Live Tweet Box on your site
You can create a tweet box on your site which will allow users to directly tweet from your site without ever going on twitter. An example of this box can be seen below: (Remember if you click tweet, it will tweet).
Try tweeting from the live box above to see how cool it is. We would really appreciate if you tweet the default content, so it helps us
Well as you can see that this live tweet box is really powerful. You can even add Retweet text in there if you want with slight customization. To add a live tweet box on your site, first paste the following code in your site’s header after the main script:
Then add the following code where you want to display the live tweet box:
We see that there are already few plugins in the WordPress plugin directory that lets you use the basic features such as hover card, or auto-link. You can use those plugins if you want, but this is something so simple that you are better of placing the codes manually.
If you liked this article then please retweet it. If we missed anything then please let us know in the comments.