1

I always find concrete examples help the most... so here's an example URL:

http://www.humanreligions.info/humanism.html

The comments and like button work as expected. But if I user has clicked on this link to get the the page, or if they click on one of the menu items and then happen to refresh the page, the browser URL is:

http://www.humanreligions.info/humanism.html#Organisations

and none of the likes and comments from the base page show up. Because of the anchor, FB is treating it as a whole new page, which is not what an anchor means nor what I want it to do.

Questions/answers on this (I've been searching for a while, sure that others must have stumbled across this simple bug!) all seem to be where people do want the # to mean something special. This was asked a year ago here facebook comment count url with an '#' anchor tag? but there are no answers,

Here are relevent code snippets from the page:

LIKE BUTTON CODE (simplified):

<iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.humanreligions.info%2Fhumanism.html"></iframe>

COMMENTS:

<div id="fb-root"></div><fb:comments href="http://www.humanreligions.info/humanism.html"></fb:comments>

MISC:

<meta property="og:url" content="http://www.humanreligions.info/humanism.html">

What else does it require to make FB treat one page as one page regardless of (irrevelent) internal anchors?

Vexen Crabtree
  • 339
  • 3
  • 16
  • I've also asked the above question on https://developers.facebook.com/docs/reference/plugins/comments/ but that page is inundated with personals ads and spam comment, so it is impossible to use it for any practical purpose. – Vexen Crabtree Jun 25 '13 at 11:11

1 Answers1

0

I know that I'm really late with this, but you can add a the data-href attribute to the facebook like button when you are using the XMLNS version of it, which I can see is being used from the comments section. So for your example you would put:

<fb:like layout="box_count" action="like" show_faces="true" share="true" data-href="http://www.humanreligions.info/humanism.html"></fb:like>
Adi Bradfield
  • 2,063
  • 1
  • 17
  • 27