• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
1

FacebookMobile API

Guest
Nov 22, 2011 Nov 22, 2011

Copy link to clipboard

Copied

Just working through an example I found and cannot seem to get a login window to appear. I keep getting an error back from facebook:

An active access token must be used to query information about the current user.

I am getting this when calling the init method like so:

FacebookMobile.init("139905189413522", loginHandler);

function loginHandler(response:Object, fail:Object):void

{   

    for (var s:String in fail.error){

      trace("key:",s,"value:",fail.error);

    }

    FacebookMobile.login(handleLogin, stage, [], new StageWebView());

}

I trace the error object and see that error text above, with a type of OAuthException.

Not sure why it's thinking I'm trying to get user data? Anyone have an idea?

TOPICS
ActionScript

Views

4.7K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Nov 23, 2011 Nov 23, 2011

Copy link to clipboard

Copied

I am also facing the same issues. Any help on this would be great.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Nov 23, 2011 Nov 23, 2011

Copy link to clipboard

Copied

I think Facebook must have changed something.  The examples that come with the API don't work either - and produce the same error message.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Nov 27, 2011 Nov 27, 2011

Copy link to clipboard

Copied

I'm having the same trouble.

Is there a way to delete the old access token so that it isn't getting checked? i.e. when we recieve teh oAuthException whats the best way to handle it?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
May 21, 2012 May 21, 2012

Copy link to clipboard

Copied

Same here,

does anyone have a solution for this? May the FB-App was set up wrong?

I haven't published my app in the Apple AppStore yet, so I had to use the "iPad App Store ID" from another App.

Would be great if someone found a workaround to get this working.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
May 25, 2012 May 25, 2012

Copy link to clipboard

Copied

LATEST

Had a headach with that to. You can have this error from the init function, it just says that the user isn't connected to fb. So you have to call the FacebookMobile.login function.

But beware, you'll have to tell est StageWebView object in the function parameters, don't put :

FacebookMobile.login(handleLogin, stage, extendedPermissions, new StageWebView());

But create and initialize the webview before the function call :

var myWebView:StageWebView = new StageWebView();

myWebView.stage = this.stage;

myWebView.viewPort = new Rectangle(0,0,stage.stageWidth,stage.stageHeight);

FacebookMobile.login(handleLogin, stage, extendedPermissions, myWebView);

Edit :

to be clear, you have to code something like this :

FacebookMobile.init("xxxxxxxxxxx", loginHandler);

function loginHandler(response:Object, fail:Object):void

{  

    if(response)

     {

          // good the user is already connected

     }

     else

     {

          var myWebView:stageWebView = new StageWebView();

          myWebView.stage = this.stage;

          myWebView.viewPort = new Rectangle(0,0,stage.stageWidth,stage.stageHeight);

          FacebookMobile.login(handleLogin, stage, extendedPermissions, myWebView);

     }

   

}

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines