In one of my page templates I have added a dynamic link to make it possible for people to share the current page on Facebook. The code looks like this:
Code:<a href="JavaScript:window.open('http://www.facebook.com/sharer.php?u=http://www.myserver.com<?UMBRACO_MACRO macroAlias="GetNiceLink"></?UMBRACO_MACRO>&t=<?UMBRACO_GETITEM field="pageName"/>','ShareOnFacebook',
'left=50,top=50,width=500,height=400,location=0,status=0,menubar=0,toolbar=0,resizable=1');">Share this page on Facebook</a>
It's funny because the code works and does not work at the same time. It works in the sense that a new pop-up window with the proper code to share the page on facebook appears. But also the main window (the page that contained the link) reloads and is empty apart from the word
[object].
I'm running Umbraco v3 and using wildcard application mapping to get friendly URL's.
The macro GetNiceLink just generates a nice link from $currentPage.
Is this a documented bug?
Is there a workaround?
/Thomas
Web Developer at Kärnhuset -
http://www.karnhuset.net - Stockholm, Sweden