Streaming live at 10am (PST)

How to integrate Facebook comments into dynamic template


#1

Hi!

I have successfully installed the Facebook comments plugin on my "Stories Template" collection of my Webflow site, however the plugin is showing site-wide comments rather than unique comment sections for every single story page in the collection.

How do I go about making a unique comment section show on every single Story page in the collection?

Here is my preview link: https://preview.webflow.com/preview/wishdish?preview=c33ed8b016e396b492c1d2e70a81a5f0

Best,
Christopher


[Resolved] 514 response on cms pages
#2

Any insight?

Christopher


#3

Making one last request for help on this. Any insight would be tremendously helpful.

Thank you,
Christopher


#4

I see only div blocks with class "fb_comments". Where did you add script?


#5

I added the script under Custom Code of the entire site.

<div id="fb-root"></div>
<script>(function(d, s, id) {
  var js, fjs = d.getElementsByTagName(s)[0];
  if (d.getElementById(id)) return;
  js = d.createElement(s); js.id = id;
  js.src = "//connect.facebook.net/en_US/sdk.js#xfbml=1&version=v2.5";
  fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>

Edit: I also assigned some custom attributes to the Div (found by scrolling to the bottom of the right menu).


#6

It looks like every single FB comment widget depends on site url. and since there is everywhere same url in data-href it keeps showing same comments everywhere.

I would try do remove data-href atribute and look how it works


#7

Awesome I will try this.

Also... great test comment :wink:


#8

^^^ I just laughed so hard at this hahaha. Glad you all were able to find a solution :smiley: @sabanna did you use this? http://lorizzle.nl/ haha


#9

Yes, exactly this one.
I am not sure that solution will work yet :confused: But really hope


#10

At least some fun along with the problem :wink:


#11

I am trying it right now. Will report back.


#12

Yikes so it broke it without the data-href: http://wishdish.webflow.io/blog/new-blog-post-to-test-a-lot-5

As you can see on this example article the comments flash a red error message, then disappear. I think I might need to generate a data-href link for every single page, no?

I wish I could set the data-href to some $link (this pulling in the current site's link), but unfortunately I don't think that is possible in Webflow.

I am exporting the site, though, so this could be the last thing I do outside of Webflow.

Christopher


#13

Pity :frowning:

Why you did not try Disqus comments?


#14

Client wants Facebook comments for growth reasons (whenever someone comments, it shows on your Facebook Wall). I had Disquis initially and they requested Facebook comments explicitly for this reason.

I will just manually make the change outside of Webflow when I export the code.


#15

But CMS site will be exported without dynamic data


#16

These are all fake stories, users, and image. Unless of course you're telling me that the entire framework for CMS gets lost upon export? :neutral_face:


#17

It will loose CMS and dynamic functionality because it will be disconnected from database


#18

Hmm I see. The client is paying someone else to port it to Wordpress and also has a backend guy who will be hooking it all up so hopefully this won't be an issue. My task is to build the frontend, and I have built it using lots of the CMS elements offered by Webflow.

Could someone from Webflow shed some more light on the reality of exporting CMS? What exactly stays, and what goes?

Christopher


#20

go to this thread here it explains a great way to go from webflow to wordpress:

I'm going to attempt to get fb comments on my different pages too.


#21

Hey guys, just wanted to post an updated on this - due to our recent Dynamic Embed Code feature, it is now possible to integrate Facebook Comments :slightly_smiling:

Take a peek here for an example: http://facebook-comments.webflow.io/dynamic-template-with-facebook-comments/test-page

Use the preview link to see how it is done: https://preview.webflow.com/preview/facebook-comments?preview=80895b186414dcf9b74e0e92b3bcb094

If you have any trouble, just shoot me a DM - happy to help!


I need help with Facebook integration for my Webflow Blog