Hi
I've done this code for create a "suggest site" button for facebook
PHP Code:
facebookbtn.addEventListener(MouseEvent.CLICK, function()
{
openPage('http://www.facebook.com/sharer/sharer.php?t=mysite&u='+escape("http://www.mysite.com"),"_popup");
})
function openPage(url:String, linkWindow:String = "_blank", popUpDimensions:Array = null):void
{
if (linkWindow == "_popup" && ExternalInterface.available)
{
var dimensions:Array = [800,600];
ExternalInterface.call("window.open('" + url + "','PopUpWindow','width=" + dimensions[0] + ",height=" + dimensions[1] + ",toolbar=yes,scrollbars=yes')");
}
else
{
// Use JS to bypass popup blockers if ExternalInterface is available
var window:String = linkWindow == "_popup" ? "_blank" : linkWindow;
if (ExternalInterface.available)
{
ExternalInterface.call('window.open("' + url + '","' + window + '")');
}
else
{
//request a blank page
navigateToURL(new URLRequest(url), window);
}
}
}
It wotks, but if i want to add an image thumb how i can do? Searching on google i've found this answer
For use a picture you need to share the page has some Metatags.
<meta name="title" content="my title" />
<meta name="description" content="my description" />
<link rel="image_src" href="images/thumbnail_image.jpg" />
how i can add it calling the external interface?
Thanks