Skip to content

Social connections

Onur Akpolat edited this page Oct 27, 2016 · 1 revision

Establish connections from a social network like facebook or twitter.

Endpoint

POST https://api.tapglue.com/0.4/me/connections/social

Params

Name Type
platform string
type string
platform_user_id string
connection_ids [string]

Example

curl https://api.tapglue.com/0.4/me/connections/social \
    -u [[app:key]]:SESSION_TOKEN \
    -H "User-Agent: Tapglue Test UA" \
    -H "Content-Type: application/json" \
    -d "{\"platform\":\"facebook\",\"type\":\"friend\",\"platform_user_id\":\"fb12345\",\"connection_ids\":[\"fb12345678\",\"fb1112131415\",\"fb16171819\"]}"

Response

{
  "users": [
    {
      "id_string": "18828624887025797",
      "id": 18828624887025796,
      "custom_id": "2",
      "social_ids": {
        "facebook": "fb1112131415"
      },
      "is_friend": true,
      "is_follower": false,
      "is_followed": false,
      "user_name": "neal",
      "first_name": "Neal",
      "last_name": "Smith",
      "email": "[email protected]",
      "url": "myapp://user/2",
      "metadata": {
        "fav_product": "product_345",
        "score": 90
      },
      "enabled": true
    },
    {
      "id_string": "19136110722551396",
      "id": 19136110722551396,
      "custom_id": "1",
      "social_ids": {
        "facebook": "fb12345678"
      },
      "is_friend": true,
      "is_follower": false,
      "is_followed": false,
      "user_name": "Vincent",
      "first_name": "Vincent",
      "last_name": "Heather",
      "email": "[email protected]",
      "url": "myapp://users/1",
      "metadata": {
        "foo": "bar"
      },
      "enabled": true
    },
    {
      "id_string": "19136842595045509",
      "id": 19136842595045508,
      "custom_id": "3",
      "social_ids": {
        "facebook": "fb12345678"
      },
      "is_friend": true,
      "is_follower": false,
      "is_followed": true,
      "user_name": "Cruz",
      "first_name": "Cruz",
      "last_name": "Karyn",
      "email": "[email protected]",
      "url": "myapp://users/3",
      "metadata": {
        "foo": "bar"
      },
      "images": {
        "avatar": {
          "url": "https://mydomain.com/users/1/avatar.jpg",
          "width": 400,
          "height": 400
        },
        "avatar_thumb": {
          "url": "https://mydomain.com/users/1/avatar_thumb.jpg",
          "width": 150,
          "height": 150
        }
      },
      "enabled": true
    }
  ],
  "users_count": 3
}
Clone this wiki locally