Identity API \ Facebook \ Read the posts of an identity PHP SDK

Resource/URI - Common GET POST PUT DELETE
Identities /identities.json List all identities
Identity /identities/<identity_token>.json Read identity details Delete identity
Identity /identities/<identity_token>/link.json ReLink identity
Identity /identities/<identity_token>/synchronize.json Synchronize identity
Identity /identities/<identity_token>/contacts.json Read identity contacts
Resource/URI - Provider Specific GET POST PUT DELETE
Steam Games /identities/<identity_token>/steam/games.json List all Steam games
Facebook Posts /identities/<identity_token>/facebook/posts.json List all Facebook posts

Workflow

Request: the code to send to the API

Send a GET request to the resource /identities/<identity_token>/facebook/posts.json to retrieve the posts of a Facebook identity. The <identity_token> has to be replaced by the unique token of an existing identity.

This endpoint has been deprecated and might be removed in the future. Please use the Pull API instead.

Result: the code returned by the API

The API returns the list of posts a user has published on this Facebook timeline. Please note that based on the user's Facebook privacy settings more or less posts might be present. The results of this endpoint are cached and updated once per day.

Example Resultset

{
  "response": {
    "request": {
      "date": "Fri, 24 Mar 2017 11:27:14  0100",
      "resource": "/identities/a8acded5-db65-44ee-8e8e-2067057d1067/facebook/posts.json",
      "status": {
        "flag": "success",
        "code": 200,
        "info": "Your request has been processed successfully"
      }
    },
    "result": {
      "data": {
        "cache": {
          "has_been_used": true,
          "date_last_update": "Fri, 24 Mar 2017 10:46:52  0100",
          "date_next_update": "Sat, 25 Mar 2017 10:46:52  0100"
        },
        "facebook_posts": {
          "pagination": {
            "current_page": 1,
            "total_pages": 1,
            "entries_per_page": 250,
            "total_entries": 5,
            "order": {
              "field": "date_published",
              "direction": "desc"
            }
          },
          "count": 5,
          "entries": [
            {
              "provider_postid": "1000000000_11111111111111111",
              "post_type": "shared_story",
              "status_update_type": "link",
              "title": "Social Media Integration",
              "message": "OneAll is a technology company offering a set of web-delivered tools and a Unified Social Network API to simplify the integration of 30  social networks.",
              "description": "Easily integrate social services like Facebook, Twitter, LinkedIn and Foursquare with your already-existing website.",
              "num_shares": "1210",
              "permalink_url": "https://www.facebook.com/1000000000/posts/11111111111111111",
              "picture_url": "https://secure.oneallcdn.com/img/heading/slides/provider_grid.png",
              "date_published": "Thu, 13 Oct 2016 08:33:37  0200",
              "author": {
                "provider_authorid": "2222222222",
                "name": "John Frazier",
                "is_user_self": true
              },
              "attached_link": {
                "title": "oneall.com",
                "url": "http://www.oneall.com"
              }
            },
            {
              "provider_postid": "1000000000_22222222222222222",
              "post_type": "mobile_status_update",
              "status_update_type": "photo",
              "story": "John Frazier shared Nirvana's photo.",
              "num_shares": "0",
              "permalink_url": "https://www.facebook.com/1000000000/posts/22222222222222222",
              "picture_url": "https://scontent.xx.fbcdn.net/v/t1.0-9/10636243_10156532331845527_1055194499667370922_n.jpg?oh=6c8a439d979bc478bceda7db40e68ecd&oe=596F7DBE",
              "date_published": "Mon, 06 Jun 2016 22:57:53  0200",
              "author": {
                "provider_authorid": "2222222222",
                "name": "John Frazier",
                "is_user_self": true
              },
              "attached_link": {
                "title": "Nirvana",
                "url": "https://www.facebook.com/Nirvana/videos/1200661110722/"
              }
            },
            {
              "provider_postid": "1000000000_33333333333333333",
              "post_type": "added_video",
              "status_update_type": "video",
              "story": "John Frazier posted a video to his timeline.",
              "num_shares": "0",
              "permalink_url": "https://www.facebook.com/1000000000/posts/33333333333333333",
              "picture_url": "https://scontent.xx.fbcdn.net/v/t1.0-9/10636243_10156532331845527_1055194499667370922_n.jpg?oh=6c8a439d979bc478bceda7db40e68ecd&oe=596F7DBE",
              "date_published": "Tue, 12 Jan 2016 18:29:55  0100",
              "author": {
                "provider_authorid": "2222222222",
                "name": "John Frazier",
                "is_user_self": true
              },
              "attached_link": {
                "title": "Nirvana",
                "url": "https://www.facebook.com/Nirvana/videos/1200661110722/"
              }
            },
            {
              "provider_postid": "1000000000_44444444444444444",
              "post_type": "added_photos",
              "status_update_type": "photo",
              "story": "John Frazier updated his cover photo.",
              "num_shares": "1",
              "permalink_url": "https://www.facebook.com/1000000000/posts/44444444444444444",
              "picture_url": "https://scontent.xx.fbcdn.net/v/t1.0-9/10636243_1000000000_44444444444444444_n.jpg",
              "date_published": "Thu, 10 Apr 2014 17:03:47  0200",
              "author": {
                "provider_authorid": "2222222222",
                "name": "John Frazier",
                "is_user_self": true
              },
              "attached_link": {
                "title": "John Frazier's cover photo",
                "url": "https://scontent.xx.fbcdn.net/v/t1.0-9/10636243_1000000000_44444444444444444_n.jpg"
              }
            },
            {
              "provider_postid": "1000000000_55555555555555555",
              "post_type": "added_like",
              "status_update_type": "status",
              "story": "John Frazier likes Nirvana",
              "num_shares": "0",
              "permalink_url": "https://www.facebook.com/1000000000/posts/55555555555555555",
              "date_published": "Tue, 29 May 2012 01:38:15  0200",
              "author": {
                "provider_authorid": "2222222222",
                "name": "John Frazier",
                "is_user_self": true
              }
            }
          ]
        }
      }
    }
  }
}

User Contributed Notes