ANE-Facebook Freshplanet - Crash after onBtnShareLink option

191 views Asked by At

I'm using the Freshplanet Facebook ANE

I'm trying to use the ANE to post a link on Fb.

When there's a tap, FB window opens and I'm able to post my message. After the post, it come back to my application and everything crash. No message added on Fb...

I'm just calling onBtnShareLink function on Sprite Click, like this :

private function onBtnShareLink(e:String):void
        {
            if(Facebook.getInstance().canPresentShareDialog()) {
                trace("ok");
                Facebook.getInstance().shareLinkDialog( "http://***.com/", "***", "*** "+e, "*** "+e, "***", errorHandler );
            } else {
                Facebook.getInstance().webDialog( "feed", { 'link':"http://***.com" }, errorHandler );
            }
        }
1

There are 1 answers

0
André Piropo On

try this...

I´m using too and it´s working for me...

private function onBtnShareLink(e:Event):void
    {
        if(Facebook.getInstance().canPresentShareDialog())
            Facebook.getInstance().shareLinkDialog( "http://Your_Web_Page_URL", null, null, null, null, errorHandler );
        else
            Facebook.getInstance().webDialog( "feed", { 'link':"http://Your_Web_Page_URL" }, errorHandler );
    }

Just set your URL and don´t change anything else and this will work.