Integrating FB social Plugin Like and Comment

Facebook has made integrating of ‘Like’ , ‘Send’ and comments really a simple process with social plugin. I have implemented all three of them without using any plugin in my wordpress blog or creating an application ID on Facebook. You can find the complete documentation of the three social plugin on Facebook developer’s Page for social plugin.

Facebook like : You can customize the like and send button for your blog. The customization include format , width , color , font and option to hide / display facepile (Thumbnail of friend’s photo). You can generate the code from here.

facebook like - social connectSimilarly you can generate the code for FB comments plugin from here. This is really social plugin as this enable comments by logging in from Facebook, Yahoo ,AOL & Hotmail.

I have implemented both of them on the individual post. The default setting for both Like and Comments is the top level domain or URL.  The problem with implementation is that the like and comments on any post are reflected on all pages.

This works for Like to a extend where visitors can like your website or blog but comments is a big fail in default installation. All comments across site might get jumbled up.

Here the fix I found working for me for both the codes.  fb code - social plugin

1. Replace href=”domain name” with expr:href=”data:post.url” for Facebook Like

2. Replace href=”domain name” with href=”<?php the_permalink(); ?>” for Facebook Comments

The result is the following implementation :

comment on individual post using FB social plugin.social plugin - FB comments

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Connect 1:1 (Topmate.io)

Recent Posts

Social Media