how to install New Official Facebook comment update

Posted in: Newspaper
Post count: 13

Hi there,

Can you give us instructions on how to install facebook’s new comment’s plugin? https://developers.facebook.com/docs/plugins/comments

Essentially, I have to include the javascript sdk on my page once, ideally after the <body> tag and then place another code where I want to replace the CURRENT comment system.

Post count: 7909

Hi,

If you need to add the code after the body tag you can do it in footer.php file – http://screencast.com/t/zXLuHRANa3 then replace theme’s default comments for each post template – http://screencast.com/t/wNkcby3T05

Thanks!

Post count: 13

Hey Alin,

Thanks for the quick response.

I got it for part 1, thanks.

Part 2 is what confuses me a bit.

Do I literally replace both the red lines you highlighted in your screengrab with the fb code below?

<div class=”fb-comments” data-href=”http://developers.facebook.com/docs/plugins/comments/&#8221; data-numposts=”5″></div>

Post count: 9544

You need to put in the correct code for *your* website, not the example you have shown above. use the “code generator” on the page you mention, and review the docs there on how to use it. You need to put in an echo element probably for your current page where the comments live, not the facebook page link you posted above(!).

That code is for THAT page on FB, not YOUR site. The href= needs to be a page on YOUR website.

Note the “code generator” which is intended to … guess what … “generate the code” needed for you to use the element on your own website.

if none of that makes sense to you, then you might want to hire a developer — or look for a plugin which would generate the correct URL for each post to put into that element.

so you would need to (per their instructions)

a) put the java SDK in your header

b) put this in your post template (so if you’re using post template 2, edit the post template file 2 in your theme root directory)

<div class="fb-comments" data-href="[your URL HERE]" data-numposts="5"></div>

You would need to replace [your URL HERE] with an echo current page/post URL element — NOT the Facebook URL, obviously.


hope that helped!

Post count: 7909

Hi,

Thanks Chris!


@alfredm
As you can see in my screenshot you will have to replace theme’s comments for each case(default, sidebar left. no sidebar), I guess that this is what you mean – http://screencast.com/t/uRFoMxcUMQG This depends where you use sidebar!

Thanks!

Viewing 5 posts - 1 through 5 (of 5 total)
The forum ‘Newspaper’ is closed to new topics and replies.