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 7753733
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T12:07:36+00:00 2026-06-01T12:07:36+00:00

I’m developing an app (Flash/AS3) that connects to Facebook. After the user logs in

  • 0

I’m developing an app (Flash/AS3) that connects to Facebook. After the user logs in I need to get his friends list (IDs only), check if any of them is a user of my app (through a registry on a database), update the list by adding a flag to every user that is also an app user and then do stuff with the updated list. My question is:

  • should I ask for the friends list, perform the check and retrieve the data to Flash when the app starts? I would have to wait for the response from Facebook plus the time to execute the script (php); I would only have one table with the app’s users info;

or

  • should I keep all of the user’s friends in my own database and have a cron job automatically updating (maybe once every day) my database, that is, asking for each of my app users’ friends list, perform the check, remove duplicates, etc etc ? In this case I would have a table with the app’s users, a table with all my users’ friends (which could be thousands, of course) and a user_friends table to relate both previous tables;

notes:
– I’m using PHP/cURL to make requests to the Graph API
– MySQl Database
– I will probably also be checking for Twitter and G+ friends for every user (so the script could take even more time, although I could go through each network in sepparate steps)

What do you think is the best approach? I don’t mind having a “loading” period in the application. At this point, I already have the first approach almost completed but a colleague suggested the second one so that the app user wouldn’t have to wait for Facebook/Twitter/G+/script response. But… isn’t that a waste of resources? I mean, Facebook, etc already have the users/friends connections…would I gain anything by replicating that in my own DB and having cron jobs doing the updates hidden from the app users?

Hope I made myself clear! Thanks!

  • 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-06-01T12:07:37+00:00Added an answer on June 1, 2026 at 12:07 pm

    I once faced a similiar problem. You won’t be able to update your database routinely because you normally need an active user (=access token) to retrieve that user’s friend list. Formerly, you could ask for a permission “offline_access”, but this permission is deprecated:
    https://developers.facebook.com/roadmap/offline-access-removal/

    I decided to write all the friends’ IDs into a textfile (User-ID as filename: 123456789.txt) on my server during the first start of my app (showing a spinner and a text saying “loading friends…”). Whenever the app was started afterwards, I pulled the IDs out of that file.

    You can trigger an update of that file by checking it’s creation date. If it’s “too old”, delete and recreate it after you’ve read all the friend IDs. That way, the file cache will be created in background and not be noticed by the user.

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

Sidebar

Related Questions

I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I need to clean up various Word 'smart' characters in user input, including but
I need a function that will clean a strings' special characters. I do NOT
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
For some reason, after submitting a string like this Jack’s Spindle from a text
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I've got a string that has curly quotes in it. I'd like to replace
I have a French site that I want to parse, but am running into
In my XML file chapters tag has more chapter tag.i need to display chapters

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.