jTweetsAnywhere

@Anywhere Registration Details and Local Server Setup

@Anywhere Registration Details

jTweetsAnywhere supports Twitter's @Anywhere features like Hovercards, Follow Button or Tweet Box. In order to start using these features, you have to register the site (application), where you plan to include the jTweetsAnywhere plugin, and obtain an APIKey (also called Consumer Key) from Twitter.

1. Lead your Browser to http://twitter.com/apps/new
2. Fill out the registration form. Be sure to select "Read & Write" for the Default Access type.

Twitter Register App

The APIKey (Consumer Key) you get is bound to the Application Website you specify in the form. The usage of @Anywhere features is restricted to that site, but you can register as many sites as you like.

Find additional infos here.

See below on how to setup your local web server so that you can test your site locally without missing the @Anywhere features.

3. Click "Save" to start the registration process and wait for the results.

Twitter Register App Details

4. Copy your Consumer Key and use it, when including the anywhere.js Javascript.
<script type="text/javascript" src="http://platform.twitter.com/anywhere.js?id=APIKey&v=1"></script>

Local Server Setup

If you have installed a local web server, to test your site, you have to set it to a domain (I used thomasbillenstein-local.com, for example) and access it from your browser via that domain in order to make Twitter's @Anywhere features work. Using something like http://localhost/myLocalSite/public_html/ won't work.

Setting your local test site to a domain is very easy when using Apache 2.2.x.

Find your Apache 2.2.x httpd-vhosts.conf configuration file. Within a default installation it should be located in the directory .../apache/conf/extra and should already be included in your main configuration file httpd.conf.

Open httpd-vhosts.conf in a text editor and add a <VirtualHost> entry for your domain. Your configuration file should look like this:

NameVirtualHost 127.0.0.1

<VirtualHost 127.0.0.1>
   DocumentRoot "C:/Programme/xampp/htdocs/thomasbillenstein-local.com/public_html/"
   ServerName thomasbillenstein-local.com
</VirtualHost>

<VirtualHost 127.0.0.1>
   DocumentRoot "C:/Programme/xampp/htdocs"
   ServerName localhost
</VirtualHost>

Next, you have to edit your etc/hosts file and add your new domain:

127.0.0.1       localhost thomasbillenstein-local.com

Restart your Apache and you're done.

If you are using any other server software, please find a similar tutorial on the net.