I'm trying to post a bookmark on facebook with a custom thumbnail, custom title(and comment if it's possible).
The widget I'm using posts links that are not related with my site. It's like the widget is posting "demo links".
I'm sure I'm loosing something really basic, but I can't figure what is it.
Also, Is there a way to just leave the "bookmark" tab?
Here's the link: http://weremsoft.com.ar/temp2/Disney/gigya/GigyaWidgetTest.html
I'm using this code:
package {
import flash.display.Sprite;
import flash.system.Security;
import flash.external.*;
import flash.display.Loader;
import flash.net.URLRequest;
import flash.display.MovieClip;
import flash.events.*;
import flash.text.TextField;
public class GigyaWidgetTest extends Sprite
{
private var wfAlreadyLoaded:Boolean = false;
private var mcWF:MovieClip = new MovieClip();
public function GigyaWidgetTest()
{
//--- This code configures and loads Wildfire ---
//Set up security to allow your widget to interact with Wildfire
Security.allowDomain("cdn.gigya.com");
Security.allowInsecureDomain("cdn.gigya.com");
// Create a load-Wildfire-Button and add an event listener to it.
var loadWildfireButton:TextField = new TextField();
loadWildfireButton.width = 150;
loadWildfireButton.text = 'Press to load Wildfire';
loadWildfireButton.x = 70;
loadWildfireButton.y = 50;
addChild(loadWildfireButton);
loadWildfireButton.addEventListener(MouseEvent.CLICK, loadWildfire);
}
private function loadWildfire(evt:Event) : void{
//prevent creation of multiple instances of wildfire
if (wfAlreadyLoaded) {
mcWF.visible = true;
return;
}
else {
wfAlreadyLoaded = true ;
}
//This code creates an empty movie clip to host the wildfire interface
addChild(mcWF).name='mcWF';
//Please position Wildfire in your Flash
mcWF.x=15;
mcWF.y=42;
// This code creates a configuration object through which Wildfire will communicate with the host swf
var ModuleID:String='PostModule1'; // pass the module id to wildfire
// Build configuration object
var cfg:Object = { }; // initialize the configuration object
//This code assigns the configurations you set in our site to the Wildfire configuration object
cfg['width']='200';
cfg['height']='250';
cfg['useFacebookMystuff']='false';
cfg['partner']='199551';
cfg['UIConfig']='<config baseTheme="v2"><display showEmail="true" showBookmark="true" showCloseButton="true"></display><body><controls><snbuttons iconsOnly="true"></snbuttons></controls></body></config>';;
// Please set up the content to be posted
cfg['defaultContent']= ''; // <-- YOUR EMBED CODE GOES HERE
var ldr:Loader = new Loader();
// set up an event handler for the onClose event, this is called when the Wildfire UI is closed.
cfg['onClose']=function(eventObj:Object):void{
mcWF.visible = false;
ldr.content['INIT']();
//you can do additional cleanup here
}
// This code calls up wildfire
var url:String = 'http://cdn.gigya.com/WildFire/swf/wildfireInAS3.swf?ModuleID=' + ModuleID;
var urlReq:URLRequest = new URLRequest(url);
mcWF[ModuleID] = cfg;
ldr.load(urlReq);
mcWF.addChild(ldr);
}
}
}
Thanks in advance.