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

  • Home
  • SEARCH
  • 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 7415383
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T07:17:36+00:00 2026-05-29T07:17:36+00:00

I need to develop a pretty complicated Flash site based on the Facebook API,

  • 0

I need to develop a pretty complicated Flash site based on the Facebook API, and if there’s a way I can develop locally rather than having to upload it all the time I would be forever grateful.

I saw a post mentioning setting something to localhost but they never specified what exactly ( is it possible to use facebook API locally? )

Much appreciated.

  • 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-29T07:17:37+00:00Added an answer on May 29, 2026 at 7:17 am

    Encapsulation is your friend in this case. When I use external / 3rd party APIs, I like to make a wrapper class of my own for the data. Let’s say you only care about ‘fbID’ and ‘userName’. Make a class of your own to hold this data once it is retrieved (private vars with getters, and 1 or more setters). Some skeleton code:

    class MyUserClass{
      //declare vars here (_fbID, _userName)
      public function setData(userID:String, userName:String):void{
        //set the values here.
      }
      //getters here (get fbID, get userName)
    }
    

    You can use 2 setter functions if you want to, but the point is that you will be able to call them with any data you want. When your entire application fetches this info from your class, and not the api directly you can work offline. When in offline mode, you can plug in some compatible ‘fake’ data to see it work.

    Now you need to take this to the next level by making a wrapper type for every call you make to facebook. What I mean by this is that since you know what to expect from fb, you can pretend you actually got it, and proceed from there. Asking for a list of friend IDs? make a fake list that is reasonable, and have your application use it. Better still, generate as many fake offline users as you want, and make your server calls delay a random ‘lag’ time before returning the fake data to the event listener. This will also help test against possible race conditions.

    One way to do this is by creating and extending a class to execute the api calls. Enjoy.

    import flash.events.EventDispatcher;
    import flash.events.Event;
    import flash.events.TimerEvent;
    import flash.utils.Timer;
    class MyApiCaller extends EventDispatcher{
        //set up vars to hold call result data
        protected var _someData:String;
        //make sure to declare some event types for the callbacks
        public static const SERVERCALL1_COMPLETE:String = "servercall1_complete";
        function MyApiCaller(){
            //init things....
        }
        public function doServerCall1(...args:*):void {
            //create the ulrLoader etc...
            //set up event listener to onServerCall1Complete
        }
        public function onServerCall1Complete(event:Event):void {
            //parse results, save to vars
            //fire event to notify the caller
            dispatchEvent(new Event(SERVERCALL1_COMPLETE));
        }
        //getter to be used when the waiting object gets the SERVERCALL1_COMPLETE event
        public function get someData():String {return _someData;}
    }
    
    
    class MyFakeApiCaller extends MyApiCaller{
        //set up any additional types (random user data etc..) that would not be found in the base class
        //no need to redeclare the event types
        function MyFakeApiCaller(){
            //init things....
        }
        override public function doServerCall1(...args:*):void {
            //wait a random amount of time via Timer, set up event listener to onServerCall1Complete
        }
        override public function onServerCall1Complete(event:Event):void {
            //event is a TimerEvent in this case        
            //generate data / choose random data
            //save to vars: _someData = ...
            //fire event to notify the caller
            dispatchEvent(new Event(MyApiCaller.SERVERCALL1_COMPLETE));
        }
        //getter from base class will be used as usual
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need to develop a generic jQuery-based search plugin for the ASP.NET MVC application
Pretty soon now, we're gonna need to develop a GUI for creating configurations (more
I need to develop an e-commerce site for my client. He wants it to
I have to develop a pretty simple php website so I don't need framework.
I need to develop an e -store application in C#.NET. There are number of
I am pretty new to webservices . We need to develop a web service
I need to develop a small-medium sized desktop GUI application, preferably with Python as
I need to develop a system for storing large numbers (10's to 100's of
I need to develop an application which stores data in a SQL Server 2005
I need to develop a CRM system which will allow users to have a

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.