I recently added some social network integration to this website. You will notice the top of the right column has links to Whitbread Design's Twitter, Facebook and RSS feeds. My goal was to increase exposure to new users by way of syndication through social networking sites. Here's how I set up some basic syndication.
First off, I had to set up accounts/pages on the previously mentioned social networking sites which was easy enough. I copied the URL's of the new Facebook/Twitter pages and pasted them directly in <a> tags to link my site back to the social profiles. My code is as follows for Twitter and Facebook:
<a href = 'http://www.twitter.com/whitbreaddesign' target = '_blank'><div class = 'RightColumnTwitterButton'><div class = 'RightColumnTwitterButtonGrey'></div></div></a>
<a href = 'http://www.facebook.com/pages/Whitbread-Design/60750279340?ref=nf' target = '_blank'><div class = 'RightColumnFacebookButton'><div class = 'RightColumnFacebookButtonGrey'></div></div></a>
FYI: I have a link around 2 div tags for the purpose of creating the mouseover effect of changing colors of the image button. I do it this way so I can preload the mouseover image so the transition is flawless.
The next social integration technique I included was the RSS feed. I used php to dynamically create my feed off of the 10 most recent blog posts. You can find the output here: rss.php.
The simplest way to code an RSS feed is as follows:
<?xml version = \"1.0\" encoding = \"UTF-8\"?>
<rss version = \"2.0\">
//Loop through this code to add multiple feed stories. <item>
<link>Link to post</link>
<guid isPermaLink=\"true\">Link to post</guid>
<comments>Link to comments on article</comments>
If you have any questions about building an RSS feed from scratch, feel free to comment on this post and I will be sure to get back to you on it.
Next, I went to FeedBurner and submitted my feed to be available for syndication.
And that's how I set up basic syndication on my website. Overall, I think adding this feature to any website is extremely beneficial. The traffic increase over time from this will definitely outweigh the time taken to set this up.
Stay tuned for part 2 of this where I move on to discussing the benefits of integrating Facebook Connect into your blog commenting. Thanks for reading and don't forget to recommend this to others if you found it useful!