Facebook comments works with /index.php?cID=122 but not /blog/myblogpost

Permalink
I created a basic Facebook comment block which works perfectly when the URL is in the formhttp://mysite.com/index.php?cID=122... but nothttp://mysite.com/blog/myblog post. When using a "nice" URL the facebook comments initiates, the three pulsing boxes that indicate loading appear, then the section vanished and displays nothing; there is no error. Being logged into concrete5 makes no difference.

Adding code to include the canonical URL in the href parameter of the <fb:comments> section did not change this behaviour.

I don't know if this is a Concrete5 quirk or a problem with the way I'm using the Facebook code, can anyone suggest how to resolve this?

The view.php code for my block is as follows:

<?php
if(!function_exists('curPageURL'))
{
   function curPageURL() {
      $page = Page::getCurrentPage();
      $url = $page->getCollectionPath();
      $pageURL = 'http';
      if ($_SERVER["HTTPS"] == "on") {$pageURL .= "s";}
      $pageURL .= "://";
      if ($_SERVER["SERVER_PORT"] != "80") {
       $pageURL .= $_SERVER["SERVER_NAME"].":".$_SERVER["SERVER_PORT"].$url;
      } else {
       $pageURL .= $_SERVER["SERVER_NAME"].$url;
      }
      return $pageURL;

 
DrStalker replied on at Permalink Reply
This turned out to be due to using an old version of the Facebook JavaScript SDK; once I tracked down newer code on the facebook developers site I found the proper code to use:
http://developers.facebook.com/docs/reference/javascript/...