$this->getArticleRoute($article) - I think this is causing crash, please explain to me?
<pre><code>    $appId = '0000004245';
    $admins = '45454454545';
    $url_img = 'http://example.com/';
    $desc = $article-&gt;metadesc;
    $colorscheme = 'light';
    $num_posts = '6';
    $width = '660';
    $f_lang = 'en-US';

    global $mainframe;

    $desc = $article-&gt;metadesc;

    if($desc == '')
        {
            $desc = $mainframe-&gt;getCfg('MetaDesc');
        }

    $mainframe-&gt;addCustomHeadTag('&lt;meta property="fb:app_id" content="'.$appId.'" /&gt;');
    $mainframe-&gt;addCustomHeadTag('&lt;meta property="fb:admins" content="'.$admins.'"&gt;');
    $mainframe-&gt;addCustomHeadTag('&lt;meta property="og:image" content="'.$url_img.'"/&gt;');
    $mainframe-&gt;addCustomHeadTag('&lt;meta property="og:title" content="'.$article-&gt;title.'"/&gt;');


    /*
    $mainframe-&gt;addCustomHeadTag('&lt;meta property="og:url" content="'.$this-&gt;getArticleRoute($article).'"/&gt;');
    */
    $mainframe-&gt;addCustomHeadTag('&lt;meta property="og:description" content="'.$desc.'"/&gt;');
    $mainframe-&gt;addCustomHeadTag('&lt;meta property="og:site_name" content="'.$mainframe-&gt;getCfg('sitename').'"/&gt;');
    $mainframe-&gt;addCustomHeadTag('&lt;meta property="og:type" content="article" /&gt;');


    $facebook_comments   = array();
    $facebook_comments[] = '&lt;img src="'.$url_img.'" border="0" alt="'.$article-&gt;title.'" style="display:none" /&gt;';
    $facebook_comments[] = '&lt;div style="margin-top:22px;display:block;float: left;width: 100%;position: relative;"&gt;';
    $facebook_comments[] = '&lt;div id="fb-root"&gt;&lt;/div&gt;';
    $facebook_comments[] = '&lt;script src="http://connect.facebook.net/'.$f_lang.'/all.js#appId='.$appId.'&amp;amp;xfbml=1"&gt;&lt;/script&gt;';
    /*
    $facebook_comments[] = '&lt;fb:comments xid="'.$appId.'" title="'.$article-&gt;title.'" href="'.$this-&gt;getArticleRoute($article).'" num_posts="'.$num_posts.'" width="'.$width.'" publish_feed="true" colorscheme="'.$colorscheme.'"&gt;&lt;/fb:comments&gt;';
    */
    $facebook_comments[] = '&lt;/div&gt;';

function getArticleRoute(&amp;$obj, $encode = 'False') {
    $url = 'Error, No URL';
    if (! is_null ( $obj )) {
        require_once (JPATH_ROOT . DS . 'components' . DS . 'com_content' . DS . 'helpers' . DS . 'route.php');
        $url = JRoute::_ ( ContentHelperRoute::getArticleRoute ($obj-&gt;slug, $obj-&gt;catslug, $obj-&gt;sectionid)); 
        $uri = &amp; JURI::getInstance ();
        $base = $uri-&gt;toString ( array ('scheme', 'host', 'port' ) );
        $url = $base . $url;
        $url = JRoute::_ ( $url, true, 0 );
        if($encode == 'True'){
            return urlencode(htmlentities( $url ));
        }else {
            return  $url;
        }
    }
    return $url;
}
</code></pre>

<p>I am trying to hand code a facebook comment box to integrate into an existing plugin file in Joomla. The two lines I commented are causing the plugin to crash. I think "$this->getArticleRoute($article)" is causing the crash. I have commented out the two lines which is causing the crash. Any suggetions why this is happening. I am not a php expert.</p>

<p>Any help will be appriciated</p>
