Skip to main content
Participant
November 23, 2011
Answered

Adobe AIR on Mobile with Facebook

  • November 23, 2011
  • 2 replies
  • 2429 views

I am developing an Adobe AIR app for mobile devices to work with Facebook. I am using the Adobe ActionScript API for Facebook Platform

I am accessing the Facebook from Actionsctipt code as follows:

FacebookMobile.init("my-numeric-app-id", initHandler);

function initHandler(success:Object, fail:Object):void

{  

    // inside login handler

}

The success object is null and and the fail object has the message "An active access token must be used to query information about the current user."

What is wrong here or what else is needed to be done to mae it work?

This topic has been closed for replies.
Correct answer

I've made a little headway with this. Within your initHandler just make a call to login:

FacebookMobile.login(loginCallback, this.stage, [], webview);

webview is a StageWebView instance with the viewPort defined. If I left it null, or didn't set the viewPort nothing happens...

var webview:StageWebView = new StageWebView();

webview.viewPort = new Rectangle(0,0,400,400);

I'm now getting a login screen.

2 replies

November 28, 2011

Did that work for you? I am still having issues... Whenever I call login I'm getting a entityRef error about a missing semi colon. Not sure what to make of it.

Correct answer
November 23, 2011

I've made a little headway with this. Within your initHandler just make a call to login:

FacebookMobile.login(loginCallback, this.stage, [], webview);

webview is a StageWebView instance with the viewPort defined. If I left it null, or didn't set the viewPort nothing happens...

var webview:StageWebView = new StageWebView();

webview.viewPort = new Rectangle(0,0,400,400);

I'm now getting a login screen.