Fields

Facebook Account objects have the following fields and links:

Fields

field name description
id id for this Facebook Account
name name for this Facebook Account
image_url link to this Facebook Account's Facebook image
profile_url link to this Facebook Account's Facebook profile
created_at when this record was created
updated_at when this record was last updated

Links

rel class embeddable? description
self facebook_account no this Facebook Account
facebook_feeds page no the Facebook Feeds belonging to this Facebook Account

List

Retrieve a paginated list of all Facebook Accounts.

GET https://yoursite.desk.com/api/v2/facebook_accounts

Applicable Roles

Agent, Reporting Agent, Workflow Manager, Knowledgebase Manager, Content Manager, Business Manager, Administrative Manager, Administrator, Knowledgebase Adminstrator, and Billing Administrator

Example Curl Request

1
2
3
$ curl https://yoursite.desk.com/api/v2/facebook_accounts \
    -u email:password \
    -H 'Accept: application/json'

Example Response

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
{
  "total_entries": 2,
  "page": 1,
  "_links": {
    "self": {
      "href": "/api/v2/facebook_accounts?page=1&per_page=50",
      "class": "page"
    },
    "first": {
      "href": "/api/v2/facebook_accounts?page=1&per_page=50",
      "class": "page"
    },
    "last": {
      "href": "/api/v2/facebook_accounts?page=1&per_page=50",
      "class": "page"
    },
    "next": null,
    "previous": null
  },
  "_embedded": {
    "entries": [
      {
        "image_url": "https://graph.facebook.com/zuck/picture?type=square",
        "profile_url": "https://www.facebook.com/zuck",
        "created_at": "2017-05-22T20:20:44Z",
        "updated_at": "2017-05-27T20:20:44Z",
        "_links": {
          "self": {
            "href": "/api/v2/facebook_accounts/1",
            "class": "facebook_account"
          },
          "facebook_feeds": {
            "href": "/api/v2/accounts",
            "class": "page"
          }
        }
      },
      {
        "image_url": "https://example.com/facebook_account_image",
        "profile_url": "https://example.com/facebook_account_profile",
        "created_at": "2017-05-22T20:20:44Z",
        "updated_at": "2017-05-27T20:20:44Z",
        "_links": {
          "self": {
            "href": "/api/v2/facebook_accounts/2",
            "class": "facebook_account"
          },
          "facebook_feeds": {
            "href": "/api/v2/facebook_feeds",
            "class": "page"
          }
        }
      }
    ]
  }
}

Show

Retrieve a single Facebook Account.

GET https://yoursite.desk.com/api/v2/facebook_accounts/:id

Applicable Roles

Agent, Reporting Agent, Workflow Manager, Knowledgebase Manager, Content Manager, Business Manager, Administrative Manager, Administrator, Knowledgebase Adminstrator, and Billing Administrator

Example Curl Request

1
2
3
$ curl https://yoursite.desk.com/api/v2/facebook_accounts/:id \
    -u email:password \
    -H 'Accept: application/json'

Example Response

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
{
  "image_url": "https://graph.facebook.com/zuck/picture?type=square",
  "profile_url": "https://www.facebook.com/zuck",
  "created_at": "2017-05-22T20:20:44Z",
  "updated_at": "2017-05-27T20:20:44Z",
  "_links": {
    "self": {
      "href": "/api/v2/facebook_accounts/1",
      "class": "facebook_account"
    },
    "facebook_feeds": {
      "href": "/api/v2/accounts",
      "class": "page"
    }
  }
}