Facebook Developers
DocsToolsSupportNewsApps
Log In
  • Social Plugins
  • Facebook Login
  • Open Graph
  • Facebook APIs
    • Graph API
    • FQL
    • Open Graph
    • Dialogs
    • Chat
    • Internationalization
    • Ads
  • Games
  • Payments
  • App Center
  • Promote Your App
  • iOS
  • Android
  • JavaScript
  • PHP
  • More SDKs
  • Objects
    • Achievement(Instance)
    • Album
    • Application
    • Checkin
    • Comment
    • Domain
    • Errors
    • Event
    • Field Expansion
    • FriendList
    • Group
    • Insights
    • Link
    • Message
    • Note
    • Offer
    • Order
    • Page
    • Pagination
    • Payment
    • Photo
    • Pictures
    • Post
    • Privacy Parameter
    • Publishing
    • Question
    • QuestionOption
    • Realtime Updates
    • Review
    • Search
    • Selecting Results
    • Status message
    • Thread
    • User
    • Video

FriendList

Facebook APIs › Graph API › FriendList

A Facebook friend list. This object represents the list itself and not the members of the list. The User object has a friendlists connection

To read a FriendList, issue an HTTP GET request to /FRIENDLIST_ID with the read_friendlists permission.


Fields

NameDescriptionPermissionsReturns
id

The friend list ID

read_friendlists

string

name

The name of the friend list

read_friendlists

string

list_type

The type of the friends list; Possible values are: close_friends, acquaintances, restricted,user_created, education, work, current_city or family

read_friendlists

string


Creating

You can create a FriendList for a user by issuing an HTTP POST request to PROFILE_ID/friendlists with the manage_friendlists permissions and the following parameter:

Parameter Description Type Required
name Friend list name. Maximum length is 25 characters string yes

If the create is successful, you get the following return.

Name Description Type
id The new friend list ID string


Deleting

You can delete a FriendList for a user by issuing an HTTP DELETE request to /FRIENDLIST_ID with the manage_friendlists permission.

The HTTP request will return true if the delete succeeded, or false otherwise.


Connections

NameDescriptionPermissionsReturns
members

All of the users who are members of this list.

read_friendlists

An array of objects containing friend id and name fields.


members

Create

You can add multiple users to a FriendList in a single request by issuing an HTTP POST request to /FRIENDLIST_ID/members and setting the members parameter to a comma-separated list of USER_IDs. An example request would look like /FRIENDLIST_ID/members?members=1,2,3. Alternatively, a single user can be added by issuing an HTTP POST request to /FRIENDLIST_ID/members/USER_ID. These operations require the manage_friendlists permission.

For adding multiple users to the same list, using the single request call is preferred for performance reasons.

Parameter Description Type Required
members Comma separated list of USER_IDs. string yes

If the add is successful, the following will be returned.

Description Type
If the add succeeded boolean

Delete

You can remove multiple users from a FriendList in a single request by issuing an HTTP DELETE request to /FRIENDLIST_ID/members and setting the members parameter to a comma-separated list of USER_IDs. An example request would look like /FRIENDLIST_ID/members?members=1,2,3. Alternatively, a single user can be removed by issuing an HTTP DELETE request to /FRIENDLIST_ID/members/USER_ID. These operations require the manage_friendlists permission.

For deleting multiple users from the same list, using the single request call is preferred for performance reasons.

Parameter Description Type Required
members Comma separated list of USER_IDs. string yes

If the delete is successful, the following will be returned.

Description Type
If the delete succeeded boolean
Updated about 8 months ago
Facebook © 2013 · English (US)
AboutAdvertisingCareersPlatform PoliciesPrivacy Policy