Publish to Facebook Stream in as3
- by Kid Adiran
Hi, I am trying to publish to a users stream when they click a share button in my flash app that i have living in a tab on a fan fan.
I basically have my swf embedded on a page that has a java script function that calls the facebook share dialogue.
Here is what i got so far:
// flash embedd
<fb:fbjs-bridge/>
// share function
<script>
function publishfeed()
{
var attachment = {'media':[{'type':'image','src':'http://bit.ly/AJTnf','href':'http://bit.ly/hifZk'}]};
Facebook.streamPublish('', attachment);
}
In my flash file, I try using this code to get it to pull the javascript funtion, but no luck.
function jspopupWindow(event:MouseEvent):void {
var request:URLRequest = new URLRequest("javascript:publishfeed()");
navigateToURL(request,"_blank");
}
share_btn.addEventListener(MouseEvent.CLICK, jspopupWindow);
Can anyone help me, what am i missing?
thanks
a