Twitter's @Anywhere platform revolutionized social integration by embedding powerful features into websites using simple JavaScript. As experienced WordPress developers, we've seen it boost tweets, traffic, follows, interactions, and user engagement. Key features include on-site tweet boxes, auto-linked usernames like @wpbeginner, hovercards with follow buttons, connect buttons, and more. With Twitter's growth, it promised to shape the social web. This guide shares proven steps to add @Anywhere to your WordPress blog.
Important Update: Twitter disabled the @Anywhere API on December 6, 2012. For modern alternatives, explore Twitter Cards or oEmbed.
To start, register for a Twitter API key via their developer portal. The signup page looks like this:

Once approved, note your API key. Crucially, set permissions to 'Read & Write' so follow buttons function properly—a common Twitter hiccup we're addressing here.
Navigate to https://twitter.com/oauth, select your app, click 'Edit Application Settings,' and change 'Default Access Type' to 'Read & Write.'
Add the core script to your theme's header.php within the <head> section:
<script type="text/javascript" src="https://platform.twitter.com/anywhere.js?id=YOUR_API_KEY&v=1"></script>
Replace YOUR_API_KEY with your actual key. Now enable features individually by adding these scripts below it.
Automatically hyperlinks @usernames in posts and comments (e.g., @wpbeginner), saving manual linking time. Excludes links, scripts, iframes, etc.
twttr.anywhere(function(twitter) {
twitter.linkifyUsers();
});
Links usernames and shows hovercards on mouseover, revealing profiles and follow buttons—users can follow directly from your site.
twttr.anywhere(function(twitter) {
twitter.hovercards();
});
Create customizable follow buttons for posts or sidebars. Example:
twttr.anywhere(function(twitter) {
twitter("#follow-wpbeginner").followButton("wpbeginner");
});Add this HTML where desired:
<div id="follow-wpbeginner"></div>
Swap 'wpbeginner' for your username.

Embed a fully functional tweet composer—users tweet without leaving your site. Powerful for engagement; customizable for retweets too.
twttr.anywhere(function(twitter) {
twitter("#custom-tweetbox").tweetBox({
label: "Live Tweet Box:",
defaultContent: "Everyone should follow @wpbeginner for amazing #WordPress tips",
height: 50,
width: 480
});
});Insert this HTML:
<div id="custom-tweetbox"></div>
WordPress plugins offer basics like hovercards, but manual implementation is lightweight and reliable.
Liked this? Retweet or comment if we missed anything.
Twitter @Anywhere Documentation
Simple Twitter Connect plugin (shoutout to Otto for this gem)