Sharing API \ Read the details of a published message PHP SDK
Advanced Sharing API Resources
Resource/URI | GET | POST | PUT | DELETE |
---|---|---|---|---|
Sharing API Messages
/sharing/messages.json
|
List published messages | Publish a new message | – | – |
Sharing API Message /sharing/messages/<sharing_message_token>.json
|
Get message details | Re-Publish a message | – | Delete a message |
Workflow
Request: the code to send to the API
Send a GET
request to the resource /sharing/messages/<sharing_message_token>.json
to obtain the details
of a previously published message. The <sharing_message_token>
has to be replaced by the unique token of a shared message user.
Result: the code returned by the API
The API will return the published message including the list of it's publications
. A publication gives you
information on which social network and on behalf of which user the message has been shared. If you have enabled tracking,
the list of tracked urls is included too.
Example Resultset
{ "response": { "request": { "date": "Tue, 20 Dec 2011 19:20:30 +0100", "resource": "/sharing/messages/328ef915-da13-4b58-83f6-6a35af3b08c0.json", "status": { "flag": "success", "code": 200, "info": "Your request has been processed successfully" } }, "result": { "data": { "sharing_message": { "sharing_message_token": "328ef915-da13-4b58-83f6-6a35af3b08c0", "date_creation": "Tue, 20 Dec 2011 17:26:59 +0100", "date_last_published": "Tue, 20 Dec 2011 17:26:59 +0100", "parts": { "text": { "body": "oneall simplifies the integration of social networks for Web 2.0 and SaaS companies" }, "picture": { "url": "http://oneallcdn.com/img/heading/slides/provider_grid.png" }, "link": { "url": "http://www.oneall.com/", "name": "oneall.com", "caption": "Social Media Integration", "description": "Easily integrate social services like Facebook, Twitter, LinkedIn and Foursquare with your already-existing website." }, "flags": { "enable_tracking": 1 } }, "publications":{ "count": 2, "entries": [ { "provider": "facebook", "user_token": "c1d82726-e81d-4e89-82af-fed19df8f64e", "identity_token": "32eb78f4-f82e-4833-8a7b-fa0348c6ff5d", "date_publication": "Tue, 20 Dec 2011 17:26:59 +0100", "shorturls": { "count": 1, "entries": [ { "shorturl_token": "8WEtk", "original_url": "http://www.oneall.com/", "short_url": "http://oal.lu/8WEtk", "date_creation": "Tue, 20 Dec 2011 17:26:59 +0100", "date_last_referral": "Tue, 20 Dec 2011 18:53:58 +0100", "num_referrals": 1 } ] } }, { "provider": "facebook", "user_token": "c1d82726-e81d-4e89-82af-fed19df8f64e", "identity_token": "32eb78f4-f82e-4833-8a7b-fa0348c6ff5d", "date_publication": "Tue, 20 Dec 2011 17:26:59 +0100", "shorturls": { "count": 1, "entries": [ { "shorturl_token": "1va2k", "original_url": "http://www.oneall.com/", "short_url": "http://oal.lu/1va2k", "date_creation": "Tue, 19 Dec 2011 17:26:59 +0100", "date_last_referral": "Tue, 20 Dec 2011 18:53:58 +0100", "num_referrals": 11 } ] } } ] } } } } } }