0

I used the code generated on this page:

https://developers.facebook.com/docs/reference/plugins/comments/

However, since my pages are dynamic I replaced this part:

<div class="fb-comments" data-href="http://example.com" data-width="470" data-num-posts="10"></div>

with...

<div class="fb-comments" data-href="http://www.mywebsite.com/index.php?a=[some dynamic name]" data-width="470" data-num-posts="10"></div>

When I try to post, the comment would show up but when I refresh the page, it would disappear. Am I doing something wrong?

catandmouse
  • 11,309
  • 23
  • 92
  • 150

1 Answers1

1

Yes, your url has get parameters.

The facebook like button, the comments box, etc, they don't use the get parameters so for you having this:

http://www.mywebsite.com/index.php?a=[some dynamic name]

or this:

http://www.mywebsite.com/index.php

Its all the same

Fabio Antunes
  • 22,251
  • 15
  • 81
  • 96
  • But how will I put the FB comments on dynamic pages? I mean, how to tag it as a different page? Is there a way? – catandmouse Apr 02 '13 at 10:02
  • 1
    Well you have to transform your urls into something like this http://www.mywebsite.com/index.php/dynamic_name, for example if you look at the stackoverflow's urls you'll see that they instead of using a get parameter for the id of the question, they use a uri segment – Fabio Antunes Apr 02 '13 at 14:10