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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T08:04:02+00:00 2026-05-27T08:04:02+00:00

I’m writing some code to handle an application invitation request (FB.ui, method = apprequests),

  • 0

I’m writing some code to handle an application invitation request (FB.ui, method = apprequests), and would like to show the user, after sending the invitation, a block containing the pictures and names of the users to whom the request was sent. It appears that the only way to do this is to get the names of all the users’s friends via an API call to /me/friends and chew through the returned object, pulling the names for each invited user. C’est la guerre.

I’ve got some code doing this, but I’m worrying a little about performance in the case where the user has a large number of friends — /me/friends will return up to 5000 friends without calling the ‘next’ link; Facebook says that the average user has around 120-130 friends. It seems like there are two ways to deal with this:

1: Do it all in the browser, in Javascript; this is surely the most straightforward, but I worry about the efficiency of the Javascript implementation(s) in dealing with large numbers of friends — it would have to deal with a pretty large object containing all the friends, and would spend a lot of time searching through that large object looking for the right ones.

2: POST the list of invitees over to my server, which would make the call to FB to get the friends and construct and return the list of user names. My gut says that the server would be a more competent (= faster, less prone to locking up) engine for doing this stuff, perhaps enough so that it would be worth the cost of making the call from javascript over to the server and back again.

But, to be honest, I don’t really know. Any opinions out there, hopefully informed ones? I could do it either way, but if there’s something resembling a best practice, I’d like to follow it. 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-05-27T08:04:02+00:00Added an answer on May 27, 2026 at 8:04 am

    You do not need to query /me/friends. When you make the FB.ui call, there is a callback containing the request_id’s and (more importantly in this case) the fbid’s of the users that were invited.

    You can search for that user directly simply with a call to :
    https://graph.facebook.com/{FRIEND_FBID}.
    These calls, even with FQL are relatively small and you shouldnt have to worry about performance. Ajax calls with the Javascript SDK would work fine, as would posting the request parameters to your server, and executing them there.
    They do take some time… but nothing u really have to worry about.


    If your apprequests are being used for in app notifications, then you’ll probably have a database set up and store your users referenced by their FBID you could also query your own database and retrieve the names, profile pictures that you saved on the users first visit.

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

Sidebar

Related Questions

For some reason, after submitting a string like this Jack’s Spindle from a text
I would like to count the length of a string with PHP. The string
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I have some data like this: 1 2 3 4 5 9 2 6
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have just tried to save a simple *.rtf file with some websites and
I've got a string that has curly quotes in it. I'd like to replace
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I have this code: - (void)parser:(NSXMLParser *)parser foundCDATA:(NSData *)CDATABlock { NSString *someString = [[NSString
I need to clean up various Word 'smart' characters in user input, including but

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.