Share Icons API \ Get insights on a shared page PHP SDK
Share Icons API Resources
Resource/URI | GET |
---|---|
Shared Pages /sharing/pages.json
|
List all shared pages |
Shared Page
/sharing/pages/<sharing_page_token>.json
|
Get page insights |
Workflow
Request: the code to send to the API
Send a GET
request to one of the following endpoints to obtain more information about a shared page:
/sharing/pages/<sharing_page_token>.json
/sharing/pages/page.json?page_url=<page_url>
The <sharing_page_token>
has to be replaced by the unique token of a shared page.
The <page_url>
has to be replaced by the url-encoded url of the page to retrieve the details for.
The following URLs are considered equivalent:
https://www.oneall.com http://www.oneall.com www.oneall.com
The result includes for example the total number shares, the date/time of each share and the ip and geolocation of the user who shared the page. Requests that return multiple entries will be paginated to 250 items by default.
Result: the code returned by the API
The API returns the details of the corresponding page and how many times it has been shared.
Example Resultset
{ "response": { "request": { "date": "Thu, 12 Nov 2015 18:01:13 0100", "resource": "/sharing/pages/3df50910-940a-4cb5-8c11-a69a09bf805d.json?entries_per_page=10", "status": { "flag": "success", "code": 200, "info": "Your request has been processed successfully" } }, "result": { "data": { "sharing_page": { "sharing_page_token": "3df50910-940a-4cb5-8c11-a69a09bf805d", "meta_title": "Social Network Integration Made Easy", "url": "http://www.oneall.com", "date_first_shared": "Sat, 02 Jun 2012 22:48:28 0200", "date_last_shared": "Mon, 04 May 2015 22:23:02 0200", "num_times_shared": 670, "sharing_page_shares": { "pagination": { "current_page": 1, "total_pages": 76, "entries_per_page": 10, "total_entries": 670, "order": { "field": "date_shared", "direction": "asc" } }, "count": 10, "entries": [ { "date_shared": "Sat, 02 Jun 2012 22:48:28 0200", "multiclick": false, "target": { "name": "StumbleUpon", "key": "stumbleupon" }, "user": { "ip_address": "123.123.123.123", "country": "France", "country_code": "FR" } }, { "date_shared": "Sat, 02 Jun 2012 22:49:30 0200", "multiclick": false, "target": { "name": "Reddit", "key": "reddit" }, "user": { "ip_address": "111.111.111.111", "country": "United States", "country_code": "US" } }, { "date_shared": "Sun, 03 Jun 2012 15:59:24 0200", "multiclick": false, "target":{ "name": "StumbleUpon", "key": "stumbleupon" }, "user":{ "ip_address": "222.222.222.222", "country": "United States", "country_code": "US" } } ] } } } } } }