Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4256002
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T05:17:39+00:00 2026-05-21T05:17:39+00:00

I’m trying to implement the 1.6 Mobile Facebook API ( http://code.google.com/p/facebook-actionscript-api/downloads/detail?name=GraphAPI_Mobile_1_6.swc ) into an

  • 0

I’m trying to implement the 1.6 Mobile Facebook API (http://code.google.com/p/facebook-actionscript-api/downloads/detail?name=GraphAPI_Mobile_1_6.swc) into an Air for Android application. I’ve succesfully used the Web and Desktop API’s however with the mobile app it’s expecting an extra parameter to a stageReference, see:

login(callback:Function, stageRef:Stage, extendedPermissions:Array, webView:StageWebView = null)

But, using i’m using Flex and not Flash CS5, i can’t just pass in this.stage or this or anything like that.

What exactly would you guys think I need to pass into that using Flash builder Flex? I can’t seem to find any examples for the mobile actionscript API so i’m kinda in the dark, anyone have any ideas?

Here’s the login information from the Mobile API Docs:

login   ()  method   
public static function login(callback:Function, stageRef:Stage, extendedPermissions:Array, webView:StageWebView = null):void
Opens a new login window so the current user can log in to Facebook.

Parameters

callback:Function — The method to call when login is successful. The handler must have the signature of callback(success:Object, fail:Object); Success will be a FacebookSession if successful, or null if not.

stageRef:Stage — A reference to the stage

extendedPermissions:Array — (Optional) Array of extended permissions to ask the user for once they are logged in.

webView:StageWebView (default = null) — (Optional) The instance of StageWebView to use for the login window For the most current list of extended permissions, visit http://developers.facebook.com/docs/authentication/permissions
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-21T05:17:40+00:00Added an answer on May 21, 2026 at 5:17 am

    If you’re using Flex, you have FlexGlobals.topLevelApplication which will point to your mx:Application or s:Application so you can call stage on that to get a reference to it.

    Otherwise, any DisplayObject attached to the stage or attached to another DisplayObject attached to the stage, will have it’s stage property set (If it’s not attached to anything, stage will be null).

    Other than that, normally what people do is keep a static somewhere that they can access through the code, that’s set when the program starts. For example, your typical main class could be something like:

    package 
    {
        import flash.display.Sprite;
        import flash.display.Stage;
        import flash.events.Event;
    
        public class Main extends Sprite 
        {
    
            public static var stage:Stage = null;
    
            public function Main():void 
            {
                // if we have our stage, go directly to _init(), otherwise wait
                if ( this.stage ) this._init();
                else this.addEventListener( Event.ADDED_TO_STAGE, this._init );
            }
    
            private function _init( e:Event = null ):void 
            {
                // remove the listener
                this.removeEventListener( Event.ADDED_TO_STAGE, this._init );
    
                // hold the stage
                Main.stage = this.stage;
    
                // do everything else
                ...
            }
    
        }
    
    }
    

    After that, anywhere in your code, you can call Main.stage to get access to the stage.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

No related questions found

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.