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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T15:43:45+00:00 2026-06-04T15:43:45+00:00

I have no idea how to start to retrieve my Facebook friends using the

  • 0

I have no idea how to start to retrieve my Facebook friends using the Facebook API. I have read the Graph API docs.

Secondly, I’m doing TDD so I want to start with my test cases.

At first, these will be integration tests because I have to integrate the real life Facebook api. After that works, I’ll mock out these tests to make them unit tests.

So this is why I’m stuck. Please assume that I have a Facebook account (eg. email + password) so I can authenticate and then use the access token to get my friends.

UPDATE:

I also do have an FB App already setup (eg. app id / app secret).

  • 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-04T15:43:47+00:00Added an answer on June 4, 2026 at 3:43 pm

    The first thing that you need to do to get the list of friends, or any other api request on the behalf of the user, is to authenticate the user and get a user access token.
    There are two authentication flows:

    • Client-Side: will result with a short lived access token (expires within a few hours) which you can then extend (on the server side) for a long lived using the new endpoint.
    • Server-Side: results with a long lived access token for about 60 days.

    It will probably be hard to do that with TDD (at least at first), and so you might want to use one of the following facebook tools which will generate the access token for you:

    • Access Token Tool: gives you a list of `access tokens for all your apps bound to your own user’. Per application you get both a user token and an app token.
    • Graph API Explorer: Select your application at the top right corner and then click the “Get Access Token” button, then select the permissions you need and approve it, when the dialog closes you’ll see the access token in the field.

    With the access token that you get you can start querying the api.
    To get the list of friends simply issue a request to me/fiends as explained in the Friends connection of the User object documentation.

    I’m not a C# developer, but I’m aware of this C# SDK for Facebook, it should (like all other facebook SDKs) have implemented most of the work for you for sending the api requests and parsing the returned data.
    From a quick look at their getting started documentation it should look something like:

    var accessToken = "THE ACCESS TOKEN YOU HAVE";
    var client = new FacebookClient(accessToken);
    dynamic me = client.Get("me/friends");
    ...
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have no idea where to start with this one. I have a confirmation
I have no idea where to start with this one: I have a database
Anyone have idea how to pass value from iPhone application to the REST-Webservice using
I'll start out by saying I have no idea what so ever about what
Anyone have idea about how to bind Boolean in sqlite with objective - c.
I have idea to write errors from my application to the Windows Event Viewer
Any body have idea how to put controls dynamically in asp.net 3.5 ? if
I missed my workspace in which I was working. Any one have idea about
I have an idea for a functional programming language design that makes heavy use
I have no idea how to pass a value from jtable1 to jtable2 .

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.