Tag Archives: Twitter @Anywhere

Integrate Twitter @Anywhere into Your WordPress Comments

You may have noticed that, a few weeks ago, I added a new field to the comment form here on Webmaster-Source. A new “Twitter ID” field lets you input your Twitter username so it can be displayed next to the name you enter, complete with hovercards from Twitter @Anywhere.

I shared the code I had thrown together with Ben Gillbanks of BinaryMoon, who now has an easy to follow tutorial available on his site. Ben cleaned the code up a bit and made some enhancements, such as some sanitization and a cookie to make the form field remember the user’s input.

If you want to add some additional social media integration to your blog, be sure to give the tutorial a look.

How to Integrate Twitters @Anywhere with your WordPress Comments [BinaryMoon]

Like it? Tweet it! A JavaScript TweetMeme Alternative

“Like it? Tweet it!” is a new JavaScript widget by Andy Graulund that, using Twitter @Anywhere, provides an easy way to display a box for people to tweet about your posts. It automatically loads a shortened URL and let’s you write a message to go along with it.

It provides more customization options than the alternatives, namely TweetMeme. You can use any link as a trigger for the overlay, and it’s possible to re-style the box. You can also change much of the text used, and set which short URL is placed in the tweet.

The only drawback is that users have to connect their account with the application. It only has to be once, and the user can then use any Like it? Tweet it! box around the internet. This is something that has been bothering me about the Twitter @Anywhere platform. Why should a basic tweet box or follow button widget require the authorization process, while the follow buttons in hovercards don’t? Why can’t they use the user’s Twitter login cookie like the hovercards do?

Twitter @Anywhere Plugin for WordPress

Want to easily add the basic features of Twitter @Anywhere to your WordPress blog? There’s already a plugin for that. It adds the requisite JavaScript for you, allowing you to enable or disable features with simple options in the WordPress Admin.

Currently it supports the auto-linking of Twitter usernames and the nifty “hovercards” feature of @Anywhere. It also can add a tweet box below you blog posts, making it easy for your visitors to update their Twitter statuses.

Some features I would like to see in future releases are:

  • Custom selectors for linkifying and hovercards. A form field could allow the administrator to enter CSS selectors, one per line, and the values would be dumped into the JavaScript function as an argument. (It’s a simple matter of using PHP’s explode() and implode() functions to replace the linebreaks with comma delimiters.)
  • An option to define a default template for the tweet box. E.g. “Reading: {post_title} {short_link}.” That way, visitors would be presented with a predefined tweet to customize, increasing the likelihood of your post being tweeted.

It’s a good start for a plugin, particularly one based on a platform so newly released. Hopefully its development will continue once its approved into the plugin repository.

Twitter @Anywhere Launches

Twitter just launched their new Twitter @Anywhere platform. It lets you “Integrate Twitter seamlessly into your site with just a few lines of JavaScript,” in a manner that reminds me of Facebook Connect. It provides various enhancements that bring the Twitter experience into your site.

The platform is just out of the bubble wrap, so there are more features and documentation coming soon, but the main features currently part of @Anywhere are:

  • Auto-linkification of usernames – The JavaScript API can automatically link anything that looks like a Twitter username to its corresponding Twitter profile. jQuery-style selectors can be used to fine-tune what gets auto-linkified.
  • Hoverboxes – If you hover over someone’s username on Twitter.com, a little thing called a “hoverbox” pops up, displaying the basic information about the account. Now you can have them on your site with a couple lines of code. This works well with the “auto-linkification.”
  • Follow buttons – Click the button, follow the account without ever leaving the page.
  • Tweet Box – Give your users a form, complete with 140-character counter, that lets them update their status. You can provide default text for the tweet, and a JavaScript callback can return the contents as either plain text or the final HTML output.
  • User login & signup – You’ve seen those “Facebook Connect” buttons before, whether on comment forms or as part of some other service that uses the Facebook API to get information or post to your profile. Twitter @Anywhere has something very similar. A way, using simple JavaScript, for users to connect their Twitter account to your site.

The question now is, what’s coming next. Could we be seeing an official retweet button as part of the @Anywhere platform? TweetMeme doesn’t use the new retweeting system yet, and Facebook offers a “Share” button and counter as part of their Connect platform. It seems like a logical step for Twitter to take.