Sharing Analytics API \ Retrieve snapshot details PHP SDK

Resource/URI GET POST PUT DELETE
Sharing Analytics Snapshots /sharing/analytics/snapshots.json List all snapshots Initiate a new snapshot
Sharing Analytics Snapshot /sharing/analytics/snapshots/<sharing_analytics_snapshot_token>.json Retrieve snapshot details Delete a snapshot

Workflow

Request: the code to send to the API

Send a GET request to /sharing/analytics/snapshots/<sharing_analytics_snapshot_token>.json to obtain the details of an existing snapshot. The <sharing_analytics_snapshot_token> has to be replaced by the unique token of an existing snapshot.

Result: the code returned by the API

The API will return the details of the corresponding snapshot. Depending on the social network, more or less information is available. The API always returns standardized results that are similar to the example below.

Example Resultset

		{
		  "response": {
		    "request": {
		      "date": "Fri, 27 Jan 2012 19:12:19 +0100",
		      "resource": "/sharing/analytics/snapshots/4384c29a-4ef0-4953-b3a0-b1c0a50a9771.json",
		      "status": {
		        "flag": "success",
		        "code": 200,
		        "info": "Your request has been processed successfully"
		      }
		    },
		    "result": {
		      "data": {
		        "sharing_analytics_snapshot": {
		          "sharing_analytics_snapshot_token": "4384c29a-4ef0-4953-b3a0-b1c0a50a9771",
		          "date_initiated": "Fri, 27 Jan 2012 17:57:05 +0100",
		          "date_finished": "Fri, 27 Jan 2012 19:04:38 +0100",
		          "sharing_message": {
		            "sharing_message_token": "dd26b533-5545-4ca1-bce0-91586799f426",
		            "date_creation": "Fri, 27 Jan 2012 17:55:32 +0100",
		            "date_last_published": "Fri, 27 Jan 2012 17:55:32 +0100"
		          },
		          "publication_snapshots": {
		            "count": 2,
		            "entries": [	   
		              {
		                "publication": {
		                  "provider": "twitter",
		                  "user_token": "a96318d1-16a4-4461-8e7e-977d78665194",
		                  "identity_token": "3e2c84e9-44c4-441b-861b-9374e1c93d4e",
		                  "date_publication": "Fri, 27 Jan 2012 17:55:32 +0100",
		                  "shorturls": {
		                    "count": 1,
		                    "entries": [
		                      {
		                        "shorturl_token": "yCnsJ",
		                        "original_url": "http://www.oneall.com",
		                        "short_url": "http://oal.lu/yCnsJ",
		                        "date_creation": "Fri, 27 Jan 2012 17:55:32 +0100",
		                        "date_last_referral": "Fri, 27 Jan 2012 18:39:50 +0100",
		                        "num_referrals": 12
		                      }	                
		                    ]
		                  }
		                },
		                "publication_snapshot": {
		                  "date_processed": "Fri, 27 Jan 2012 19:04:38 +0100",
		                  "status": {
		                    "flag": "success",
		                    "code": "200",
		                    "message": "Message still exists"
		                  },
		                  "urls": {
		                    "count": 1,
		                    "data": [
		                      {
		                        "target": "http://www.oneall.com",
		                        "num_referrals": "12",
		                        "date_last_referral": "Fri, 27 Jan 2012 18:39:50 +0100"
		                      }	                     
		                    ]
		                  },
		                  "likes": {
		                    "count": 0
		                  },
		                  "comments": {
		                    "count": 0
		                  },
		                  "retweets": {
		                    "count": 2,
		                    "entries": [
		                      {
		                        "username": "example_user_1",
		                        "profileUrl": "http://www.twitter.com/example_user_1",
		                        "num_followers": 500,
		                        "data_member_since": "Fri, 27 Jan 2012 18:13:45 +0100"
		                      },
		                      {
		                        "username": "example_user_2",
		                        "profileUrl": "http://www.twitter.com/example_user_2",
		                        "num_followers": 100,
		                        "data_member_since": "Fri, 21 Jan 2012 18:13:45 +0100"
		                      }
		                    ]
		                  }
		                }
		              },             
		              {
									  "publication": {
									    "provider": "facebook",
									    "user_token": "e859e757-5d5f-499d-b105-227b2d6a35a5",
									    "identity_token": "d8432de1-49a1-4b93-b95e-b2bde6a697c5",
									    "date_publication": "Wed, 21 Dec 2011 01:34:36 +0100",
									    "shorturls": {
									      "count": 1,
									      "entries": [
									        {
									          "shorturl_token": "n0o5d",
									          "original_url": "http://www.oneall.com/",
									          "short_url": "http://oal.lu/n0o5d",
									          "date_creation": "Wed, 21 Dec 2011 01:34:35 +0100",
									          "num_referrals": 63
									        }
									      ]
									    }
									  },
									  "publication_snapshot": {
									    "date_processed": "Thu, 26 Jan 2012 14:29:24 +0100",
									    "status": {
									      "flag": "success",
									      "code": 200,
									      "message": "Message still exists"
									    },
									    "urls": {
									      "count": 1,
									      "data": [
									        {
									          "target": "http://www.oneall.com/",
									          "num_referrals": "63"
									        }
									      ]
									    },
									    "likes": {
										    "count": 5,
										    "entries": [
										      {
										        "username": "Example User1",
										        "profileUrl": "http://www.facebook.com/profile.php?id=1"
										      },
										      {
										        "username": "Example User2",
										        "profileUrl": "http://www.facebook.com/profile.php?id=2"
										      },
										      {
										        "username": "Example User3",
										        "profileUrl": "http://www.facebook.com/profile.php?id=3"
										      },
										      {
										        "username": "Example User4",
										        "profileUrl": "http://www.facebook.com/profile.php?id=4"
										      },
										      {
										        "username": "Example User5",
										        "profileUrl": "http://www.facebook.com/profile.php?id=5"
										      },
										    ]
										  }					    
											"comments": {
										    "count": 4,
										    "entries": [
										      {
										        "date": "Thu, 26 Jan 2012 06:57:48 +0100",
										        "content": "Comment1: Full Comment Text",
										        "username": "FacebookUser1",
										        "profileUrl": "http://www.facebook.com/profile.php?id=1"
										      },
										      {
										        "date": "Thu, 26 Jan 2012 07:03:24 +0100",
										        "content": "Comment2: Full Comment Text",
										        "username": "FacebookUser2",
										        "profileUrl": "http://www.facebook.com/profile.php?id=2"
										      },
										      {
										        "date": "Thu, 26 Jan 2012 07:03:41 +0100",
										        "content": "Comment3: Full Comment Text",
										        "username": "FacebookUser3",
										        "profileUrl": "http://www.facebook.com/profile.php?id=3"
										      },
										      {
										        "date": "Thu, 26 Jan 2012 07:11:44 +0100",
										        "content": "Comment4: Full Comment Text",
										        "username": "FacebookUser4",
										        "profileUrl": "http://www.facebook.com/profile.php?id=4"
										      }
										    ]
										  }
									  }
									}
		            ]
		          }
		        }
		      }
		    }
		  }
		}

User Contributed Notes