Share your Tumblr blog with Facebook!
So I wanted to allow visitors to share any posts or videos or links or whatever with their friends, so I did a bit of research to work out how, and I think the best option is to share on Facebook, ‘cause pretty much EVERYONE is on Facebook. So here’s some instructions for you to do the same on your own blog.
Click on Customize at the top right of your Tumblr blog.
Click on Theme. You’ll want to access ‘custom HTML’.
Paste this somewhere after <head> and somewhere before </head> :
<meta property=”og:title” content=”{block:PostTitle}{PostTitle}{/block:PostTitle}”/>
<meta property=”og:site_name” content=”Alan’s blog”/>
Change the “content=” to your own blog name, however you want it displayed.
Then go here to Facebook. Fill out the details of your site, and make sure you use the base URL of your site (in my case it’s http://alanzeyes.tumblr.com).
After you’ve got your Like button looking how you want, click on Get Code and copy the iframe code.
Paste it into your custom HTML so it appears after {/block:More} and before {block:Permalink}:
<iframe src=”http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Falanzeyes.tumblr.com&layout=standard&show_faces=true&width=450&action=like&colorscheme=light&height=80” scrolling=”no” frameborder=”0” style=”border:none; overflow:hidden; width:450px; height:80px;” allowTransparency=”true”></iframe>
Now you’ll need to change a small part of this code. Where it has “href=http%3A%2F%2Falanzeyes.tumblr.com” (with your site’s base URL) you’ll need to change this to “href={Permalink}”
The reason for that is that the code will then grab the permanent link of each post you want to share, rather than just the base URL of the site. That’s a very important element that you’ll need to make sure you modify, otherwise people will be sharing just the site instead of each post.
Once you’ve done that, click on Update HTML, and then Save + Close. That’s it!
Please make sure you click on Like if you want to share this post. :)