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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T21:29:04+00:00 2026-05-24T21:29:04+00:00

My end goal is for my site to be able to use Facebook API

  • 0

My end goal is for my site to be able to use Facebook API to print a user’s (alphabetized) FB friends out on the screen (I have already done this much) and then have it so they can click on a printed name so that it then stores it on a list on MY website (‘Favorite Facebook friends’, for example).

In summary, I already made it so it prints out their friends alphabetically, so from here I need my website to be able to store the names they click/choose from the list to be used at another time.

Here is what I have so far:

function populateFriendList(session){
  FB.api('/me/friends', {fields: 'name', offset : 0, limit :5000 }, function(response) {  
    for (var i=0, l=response.data.length; i<l; i++){
      var friend = response.data[i];
      FbFriends[i]=friend.name
    }

    document.getElementById('myFriendList').innerHTML = FbFriends.sort().join('<br>'); 
    FB.XFBML.parse(document.getElementById('myFriendList'));
  });     
};

I will be forever grateful to anyone who helps me with this!

  • 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-24T21:29:06+00:00Added an answer on May 24, 2026 at 9:29 pm

    You have created code that returns data. If you want to resend ( ie serve ) that data to another user then you need to store that data on the server side.

    So you need two things :

    1.) Server side code to receive the data that your existing JS code has generated

    2.)A location for that data to exist. This could be files written by your server side code or a database.

    So you might do something like this

    1.) get your user list

    2.) using Ajax send that list to server side code

    3.) server side code stores that information in a data base

    4.) when needed the server side code retrieves the list and formats for whatever your next use is

    I think this site would be a good place for you to start learning about this Tizag Ajax Tutorial

    You can find examples for how to transform JS arrays or list to UI here Example 1 and here Example 2

    you could then send the result of those selections to your server

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

Sidebar

Related Questions

The end goal is to have some form of a data structure that stores
having some issues with a networking assignment. End goal is to have a C
My end goal is to have Selenium running 'within' Jenkins. My Jenkins installation runs
Need to identify user on intranet site, windows user name is the goal. That
I actually have a few questions here: My end goal is to write a
my end goal is to have two apps, a main app (which will do
My end goal is to be able to send: $('[data-track]').live('click', function () { mpmetrics.track(Share,
The end goal is for the user to download a .csv file. Right now
I have been searching to figure out how exactly to use the oauthable module
end goal is to have the bash run something like php script.php argument1 argument2

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.