Twitter @Anywhere lets you bring Twitter functionality to your website or landing pages. You can add Hover Cards, Follow Me buttons, Tweet This Boxes, automatically link Twitter usernames to profiles and do it all without making your users leave your page. This is great news for landing page conversion geeks as it means your visitors can stay where they are while benefiting from enhanced social media interaction.
The first step is to visit http://dev.twitter.com/anywhere/apps/new to register a new @Anywhere app and get a unique API key. If you click on the image opposite, you’ll see examples of the information you’ll need to insert to get it working on Unbounce.
Follow these steps to create your @Anywhere app and get your API key:
You’re now ready to start adding Twitter @Anywhere to your landing page.
To get your @Anywhere app running on your Unbounce landing page you need to add a global @Anywhere Javascript reference. To do this, click the Scripts button in the editor toolbar. You will now see the window shown in the image opposite.
<script src="http://platform.twitter.com/anywhere.js?id=YOUR_API_KEY&v=1" type="text/javascript"></script>Note: You should reference the original Twitter page to verify this code remains the same: http://dev.twitter.com/anywhere/begin
Two of the most common @Anywhere widgets are the Follow Button and Tweet This Box. You can add these to your page by using a “Custom HTML” component from the landing page editor menu. Click the image opposite for a example of how these 2 widgets will look on your page.
To add a Follow Button, add a “Custom HTML” component to your page, and enter the following Javascript code:
<div id="tbox"></div>
<script type="text/javascript">
twttr.anywhere(function (T) {
T("#tbox").tweetBox();
});
</script>
To add a Tweet This Box, add a “Custom HTML” component to your page, and enter the following Javascript code:
<div id="tbox"></div>
<script type="text/javascript">
twttr.anywhere(function (T) {
T("#tbox").tweetBox({
height: 100,
width: 400,
defaultContent: "Enter your own message in here"
});
});
</script>
You can adjust the height and width, and some other parameters (see the link below for options). Make sure your “Custom HTML” component is bigger than the height/width you specify here so allow for the Tweet button to appear. You can play around with this by saving your page and hitting Preview.