The second url link is not missing the viewtopic.php or viewforum.php.
That url is meant to be the domain url.
Shared url looks like this.
broken down to each php equivalent
$_SERVER['HTTP_HOST] = 'http://'
$_SERVER['SERVER_NAME'] = 'www.example.com/'
$_SERVER['SCRIPT_NAME'] = 'viewtopic.php'
$_SERVER['QUERY_STRING'] = '?f=1&t=1'
When facebook tries to get the base domain from the shared or commented url it fails by not removing the query string so the domain url still has the query string in the link.
here is comment made via the comments social plugin
Damien Keitel commented on Re: [DEV] Facebook 2011 by keitzy » March 21st, 2011, 10:30 pm Development is moving ve
on Damien Keitel Modification Development.
Testing out the url.
Notice the urls.