web technology is a way of life
It’s quite simple to add the Facebook Like button to your blog. If you don’t mind editing code and don’t want to deal with a plug-in you can simply drop in this bit of code (to your index.php & single.php files); note that the URL I’m using is based on a previous post for creating your own shortURL for WP:
<iframe src="http://www.facebook.com/plugins/like.php?href=http://joelnagy.com/p<?php the_ID(); ?>&layout=standard&show_faces=false&width=425&action=like&colorscheme=light" scrolling="no" frameborder="0" allowTransparency="true" style="border:none; overflow:hidden; width:425px; height:30px;"></iframe>
So please share the love and Like this!
The Livescribe Pulse smartpen gets an app store. This little pen is quite amazing, and it just shows that the business model of an app store is already changing the market for every type of electronic device. So when does my…
The Ghostwire (DSiWare) game looks great and reminds me a lot of Fatal Frame.
FloorPlanner is an interesting bit of software built in Flash that allows you design your home in 2D and view in 3D.
The new Stargate Universe [Philosphocal] teaser looks awesome. I stopped watching Atlantis a bit ago because it got boring, I hope this pumps up the energy as BSG did. It has Lou Diamond Philips and Ming-Na in it, that could make…
Here’s a plethora of well designed RSS Feed icons for free!
2 Responses for "Add Facebook “Like” to Your WordPress Blog"
I put this in and worked great, unfortunately, worked great pointing to your webpage. DOh, that’s my bad, so I swapped the URL in the script; unfortunately I can’t get it to work putting in my domain, keep getting this error:
The page at http://ianchristy.com/104 could not be reached.
I swapped in this:
<iframe src=”http://www.facebook.com/plugins/like.php?href=http://ianchristy.com/&layout=standard&show_faces=false&width=425&action=like&colorscheme=light” scrolling=”no” frameborder=”0″ allowTransparency=”true” style=”border:none; overflow:hidden; width:425px; height:30px;”>
doesn’t seem to work, and I don’t get enough about the WP scripting to see where the “104″ is coming from. Appears to be a page number. Hos should this script look or what function should I change to get the facebook bit to like my URL instead of yours?
Thanks!
e
ian: the URL structure builds on my previous post for using shortURLs based on the postID only (which is what the 104 is coming from). If you are not using a shortURL you’ll want to use this for your URL in the href param:
< ?php echo urlencode(get_permalink($post->ID)); ?>