Provider API \ List all Facebook pages of your users PHP SDK

Send a GET request to this resource to retrieve the list of Facebook pages belonging to your users.

Resource/URI GET POST PUT DELETE
Providers /providers.json List all providers
Resource/URI @Facebook GET POST PUT DELETE
Facebook Pages /providers/facebook/pages.json List all Facebook pages
Facebook Page /providers/facebook/pages/<page_token>/publish.json Publish on a Facebook page

Workflow

Request: the code to send to the API

Send a GET request to the resource /providers/facebook/pages.json to obtain the list of Facebook pages belonging to your users. To retrieve the pages of your users during their connection with Facebook you have to enable the option Manage Pages in your OneAll Facebook settings.

Result: the code returned by the API

The API will return the Facebook pages of your users. Requests that return multiple entries are paginated to 250 items by default. Each entry contains a page_token that uniquely identifies the page and that you can use to publish content on that page.

Example Resultset

  {
    "response": {
      "request": {
        "date": "Wed, 08 Apr 2015 17:29:43  0200",
        "resource": "/providers/facebook/pages.json",
        "status": {
          "flag": "success",
          "code": 200,
          "info": "Your request has been processed successfully"
        }
      },
      "result": {
        "data": {
          "provider": "facebook",
          "pages": {
            "pagination": {
              "current_page": 1,
              "total_pages": 1,
              "entries_per_page": 250,
              "total_entries": 2,
              "order": {
                "field": "date_creation",
                "direction": "desc"
              }
            },
            "count": 2,
            "entries": [
              {
                "user_token": "48d6b4a9-afd7-4ee7-b359-45bbf618ebe9",
                "identity_token": "f5148587-3925-4fec-a214-3a339a023d2b",
                "page_token": "c66c2d03-c9de-485b-9aea-445c405d44ab",
                "date_creation": "Tue, 07 Apr 2015 10:37:52  0200",
                "name": "Test Page",
                "description": "This is the description of the page.",
                "category": "Community",
                "num_likes": 27,
                "link": "https://www.facebook.com/test-page",
                "thumbnailUrl": "https://graph.facebook.com/1234567890/picture?type=square",
                "pictureUrl": "https://graph.facebook.com/1234567890/picture?type=large",
                "source": {
                  "identifier": 1234567890,
                  "access_token": {
                    "key": "E797C0013811A1D1E35AD7EDD10FB99986DB664B0996C76ED9AE5E0A5151BBF9E797C0013811A1D1E35AD7EDD10FB99986DB664B0996C76ED9AE5E0A5151BBF9"
                  }
                }
              },
              {
                "user_token": "1f178827-c746-43e0-84d0-75cfd0513b1e",
                "identity_token": "462fae22-f46b-4343-838c-1fc35113e92c",
                "page_token": "886a4c73-fa1a-4261-839f-42672f42b842",
                "date_creation": "Tue, 07 Apr 2015 10:37:52  0200",
                "name": "Another Test Page",
            	  "description": "This is the description of the page.",
                "category": "Computers/internet website",
                "num_likes": 2119,
                "link": "https://www.facebook.com/another-test-page",
                "thumbnailUrl": "https://graph.facebook.com/987654321/picture?type=square",
                "pictureUrl": "https://graph.facebook.com/987654321/picture?type=large",
                "source": {
                  "identifier": 987654321,
                  "access_token": {
                    "key": "A21C619251FB098250A15A69B20BEE6ED6835149CE1496D78A674F11B0920F9FA21C619251FB098250A15A69B20BEE6ED6835149CE1496D78A674F11B0920F9F"
                  }
                }
              }               
            ]
          }
        }
      }
    }
  }
  

User Contributed Notes