Support » Plugins and Hacks » [Resolved] Facebook like buttons for posts (without a plugin)

[Resolved] Facebook like buttons for posts (without a plugin)

  • Hi. I’ve been googling and I can’t find a way to hardcode facebook likes into my single.php loop. It looks like they changed the formula for the like button, which definitely used to work. I succeeded in integrating twitter with my site in such a way. To my knowledge, the default code that facebook distributes from their site only works on actual sites not posts. I can’t believe every single WP user out there is using the facebook plugin to have like buttons on their posts.

    Thank you for your answers 🙂

Viewing 1 replies (of 1 total)
  • I figured it out.

    The old code that Facebook used still works. I don’t think it’s even possible to get this from facebook’s dev site.

    <iframe src="http://www.facebook.com/plugins/like.php?href=<?php echo urlencode(get_permalink($post->ID)); ?>&layout=button_count&show_faces=false&width=90&action=like&colorscheme=light" scrolling="no" frameborder="0" allowTransparency="true" style="border:none; overflow:hidden; width:90px; height:20px"></iframe>

Viewing 1 replies (of 1 total)
  • The topic ‘[Resolved] Facebook like buttons for posts (without a plugin)’ is closed to new replies.