GET login/users/:user id/friends/facebook

From Social ID Developers
Jump to: navigation, search

Contents

Description

Get Facebook user friends.

Facebook only allows searching for user friends that have also authorized your Facebook application. Therefore, some user friends will not be retrieved by this API.

After the Facebook friends search, each friend is also searched in the Database. When the friend is found, all his/her information already obtained by previous sources is returned; Otherwise, only the information retrieved from Facebook is returned.

Resource URL

  GET https://api.socialidnow.com/v1/marketing/login/users/:user_id/friends/facebook

Parameters

URL Parameters

user_id required user identifier.
limit optional maximum amount of results to be returned (page size). Default: 25.
offset optional amount of results to be discarded (page start). Default: 0.

Authentication

This API requires Login App authentication. See Authentication.

Response

Response Status

ok (200) The request was successful.
unauthorized (401) The authentication is wrong. See Authentication.
forbidden (403) The Account has no permission to access this user.
not_found (404) The user was not found.
internal_server_error (500) An unknown error happened.

Response Body

A successful search returns the following fields:

total total count of user friends on Facebook. (Important: this field may be null for old Facebook applications)
count amount of friends returned for this request.
offset amount of friends discarded (page start).
results array with friend details. See Social Profile Fields for the complete list of returned fields.

Examples

Request

Returns friends of user "340", with limit of 3 friends, discarding first 5.

curl -iX GET 'https://api.socialidnow.com/v1/marketing/login/users/340/friends/facebook?limit=3&offset=5' \
-H 'Content-type: application/json' \
--user 138:e8b9ca24f1b590af67e6271297d6e1f7226625d61c5b5daa1b2f215464e292cf

Response

Response Headers

HTTP/1.1 200 Ok
Status: 200

Response Body

{
  "count": 3,
  "offset": 5,
  "total": 10,
  "results": [
    {
     "about_me": "Software Engineer",
     "addresses": [
       {
         "country":"br",
         "formatted":"Campinas, SP, Brasil",
         "locality":null,
         "postal_code":null,
         "region":null,
         "street_address":null
       }
     ],
     "birthday": "1980-10-01",
     "certifications":[],
     "courses":[],
     "current_location": "Campinas, SP, Brasil",
     "display_name": "John Doe",
     "educations": [
       {
         "degree": "null",
         "description": null,
         "end_date": null,
         "name": "Universidade Estadual de Campinas",
         "start_date": null,
         "type": "Graduate School"
       }
     ],
     "emails": [
       {
         "primary": true,
         "type": "other",
         "value": "john.doe@somedomain.com"
       }
     ],
     "gender": "male",
     "hometown": "San Francisco, CA",
     "honors": null,
     "ims": [
     ],
     "industry": null,
     "interested_in_meeting": [
     ],
     "interests": [
       {
         "category": "Interest",
         "link": "http://www.facebook.com/pages/Conference-on-Computer-Vision-and-Pattern-Recognition/137428412945882",
         "name": "Conference on Computer Vision and Pattern Recognition"
       }
     ],
     "languages_spoken": [
       {
         "level": null,
         "name": "Portuguese"
       }
     ],
     "likes": [
       {
         "category": "Product/service",
         "link": "http://www.facebook.com/coffeebeantech",
         "name": "Coffee Bean Technology"
       }
     ],
     "locale": "en",
     "name": {
       "family_name": null,
       "formatted": "John Doe",
       "given_name": null,
       "honorific_prefix": null,
       "honorific_suffix": null,
       "middle_name": null
     },
     "nickname": null,
     "organizations": [
       {
         "department": null,
         "description": null,
         "end_date": "2006-01-01",
         "location": "São Paulo, SP",
         "name": "Coffee Bean Technology",
         "primary": false,
         "start_date": "2001-01-01",
         "title": "Software Developer",
         "type": null
       }
     ],
     "phone_numbers": [
     ],
     "picture_url": "http://somedomain.com/johndoe.jpg",
     "political_views": null,
     "preferred_username": "johndoe",
     "professional_headline": null,
     "profile_url": null,
     "providers": {
       "facebook": {
          "id": "12345",
          "picture_url": "https://www.facebook.com/johndoe",
          "profile_url": "https://www.facebook.com/johndoe.png",
          "username": "johndoe"
       },
       "twitter": {
          "id": "456",
          "picture_url": "https://www.twitter.com/johndoe",
          "profile_url": "https://www.twitter.com/johndoe.png",
          "username": "johndoe"
       },
       "linkedin": {
          "id": "http://www.linkedin.com/in/johndoe",
          "picture_url": "http://www.linkedin.com/in/johndoe.png",
          "profile_url": "http://www.linkedin.com/in/johndoe"
       },
       "gplus": {
          "id": "456",
          "picture_url": "https://plus.google.com/johndoe",
          "profile_url": "https://plus.google.com/johndoe.png",
          "username": "johndoe"
       }
     },
     "quotes": [
     ],
     "relationship_status": "married",
     "religion": null,
     "significant_other": null,
     "specialties": null,
     "status": null,
     "updated": "2012-12-22T01:27:13Z",
     "urls": [
       {
         "primary": false,
         "type": null,
         "value": "http://somedomain.com/johndoe"
       }
     ],
     "utc_offset": "-10800",
     "verified_account": "f",
     "verified_email": "john.doe@somedomain.com"
    },
    { ... }
  ]
}
Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox