_Tasmo:Backlog

Red, Green, Blue
and all the stuff, that really matters

New theme variable transformation: URLEncoded for Facebook Like Button

staff:

You can now prefix any theme variable with “URLEncoded” to output a URL encoded string. This should make it easier to integrate third-party widgets like Digg, or Facebook’s new Like Button.

<a href="http://digg.com/submit?url={URLEncodedPermalink}">Digg</a>

My version for the new Facebook feature:

In the <HEAD> element I use:

<meta property="og:title" content="{PostTitle}{/block:PostTitle}{block:PostSummary}{PostSummary}{/block:PostSummary}" />
<meta property="og:site_name" content="{Title}" />
<meta property="og:image" content="{PortraitURL-128}" />

and in <BODY>:

<!-- FACEBOOK LIKE BUTTON -->
<iframe src="http://www.facebook.com/plugins/like.php?href={URLEncodedPermalink}&amp;layout=standard&amp;show_faces=false&amp;width=85&amp;action=like&amp;font=arial&amp;colorscheme=evil" scrolling="no" frameborder="0" allowTransparency="true" style="border:none; overflow:hidden; width:85px; height:px"></iframe>
<!-- END FACEBOOK LIKE BUTTON -->
1 year ago 973 notes View comments

Reblogged from staff

Source: staff

Tagged with:  #Facebook  #Tumblr

Blog comments powered by Disqus
  1. repostr reblogged this from staff
increase your wisdom | RSS Feed | Archive |