I've the following condition to check the user agent.
if request.env['HTTP_USER_AGENT'] =~ /feedburner/i
@posts = Post.recent(10)
render :layout => false
else
redirect_to 'http://feeds.feedburner.com/MyAppFeed'
end
Its working fine. Now I need to check for the facebook user agent! What would be the name of facebook user agent or is there any way to distinguish user agent between browser or other site internal bot??