How do you handle FB asynchronous requests?

Discussion in 'iPhone/iPad Programming' started by mrl72, Jan 10, 2011.

  1. macrumors regular

    Joined:
    Apr 20, 2008
    #1
    So I'm working on my app that connects to FB, gets my user info then pulls down my friends and then pulls down friend details. Right now I am using the FB SDK to connect and authenticate and then the Graph API to issue the individual requests for information. All works good, except even though I fire the requests off separately if one request takes longer than the other then I get results out of sequence. Ideally I want to do things in order as I have other stuff relying on the order these requests are executed.

    Any thoughts on how to do this?

    Cheers.
     
  2. Moderator

    dejo

    Staff Member

    Joined:
    Sep 2, 2004
    Location:
    The Centennial State
    #2
    The trick lies in setting up your delegate callbacks properly.
     
  3. thread starter macrumors regular

    Joined:
    Apr 20, 2008
    #3
    Thanks dejo - do you mean how it handles the response ie in the didLoad method? That's currently where I'm putting my parsing code for both of my Graph API calls. Not sure what else you could mean..

    Cheers.
     
  4. Moderator

    dejo

    Staff Member

    Joined:
    Sep 2, 2004
    Location:
    The Centennial State
    #4
    Perhaps if I can see some code I can explain better.
     

Share This Page