Suggested Friend
Returns suggested friends on MapMyFitness and Facebook for a given user.
Resource URIs
Collection URI: /v7.1/friend_suggestion/
Item
Item Properties
Name | Description | Type | HTTP Support |
---|---|---|---|
reasons |
A list of the reasons this user is being suggested. | reason |
GET: Required |
Reason object
An object that includes the suggestion source and weight as factored into the total suggestion score, e.g:
{"source": "facebook", weight: 1}
Item links
mutual_friends
Links to the list of users the requesting user and this suggestion have in common. Includes a count of all mutual friends.
user
Links to the user being suggested. Includes the user’s display_name.
profile_picture
Links to the profile image for the suggested user.
Collection
Collection methods
GET
Retrieve a list of friend suggestions.
Collection query parameters
Name | Description | Type | Required |
---|---|---|---|
user |
The user to retrieve suggestions for. | user id or href |
Required |
Embedded collections
suggestions
A collection of suggested friend items with properties as described under Item properties and links as described under Item links
Usage
GET Suggested Friends for a user
Request: GET /v7.1/friend_suggestion/?user={id}
Response: 200
{
"_embedded": {
"suggestions": [
{
"reasons": [
{
"source": "native",
"weight": 1.0
}
],
"_links": {
"profile_picture": [
{
"href": "/v7.1/user_profile_photo/{their_id}/",
"id": "{their_id}",
"name": "user_profile_photo"
}
],
"mutual_friends": [
{
"count": 4,
"href": "/v7.1/user/?mutual_friends_for={their_id},{your_id}"
}
],
"user": [
{
"href": "/v7.1/user/{their_id}/",
"display_name": "Friend, A.",
"id": "876537"
}
]
}
},
...
]
},
"_links": {
"self": [
{
"href": "/v7.1/friend_suggestion/?limit=20&user={your_id}&offset=0"
}
],
"documentation": [
{
"href": "https://developer.mapmyfitness.com/docs/"
}
],
"next": [
{
"href": "/v7.1/friend_suggestion/?limit=20&user={your_id}&offset=20"
}
]
}
}