Take the 2-minute tour ×

For my iPhone app, an user can logged in using Facebook, then the app can get list of friends that already on the app. Now I am wondering - when should the user's Facebook friends be pulled down. Should it be the time when the user start using the app and login with Facebook? Or should it be done periodically in the background thread? Or should it actually be done on my apps' web service side (with the access token received and sent over from the iPhone app) What's the best practice to go with?

The main concerns are

    total # of friends could be a large number, which would require a lot of network traffic
    time processing

share|improve this question
There's no "right or wrong" here, it depends what you need to do.. Why do you need the friends list to begin with? Are you saving anything to the a database? –  Nitzan Tomer Apr 5 '12 at 19:02
I don't save anything to a database. Just cache for gaining on performance. Would be very interested to know the best practice out there. –  tom Apr 5 '12 at 19:10
add comment

1 Answer

up vote 1 down vote accepted

A couple of options:

From your comments below your question, cache friends lists for a minimum of 24 hours. Friend listings rarely change often (unless the user is under 25 years of age, then it might change more frequently...statistically speaking).

Another option you can also subscribe to a user using the Real Time API. Store their friend information on your server and when Facebook tells you they've added a new friend you add it to your data store. Then you can query your own server rather that hitting the Graph API.

share|improve this answer
add comment

Your Answer


