{"_id":"546be36255639108002b184c","project":"545137a814af501a00b50cf9","user":"5433099f9a2b451a00ad4531","__v":5,"category":{"_id":"546b9072b47b5d1400109edf","project":"545137a814af501a00b50cf9","version":"545137a814af501a00b50cfc","__v":6,"pages":["546bdfb555639108002b1842","546be31f52812008000414af","546be32e55639108002b184a","546be33c52812008000414b1","546be34a52812008000414b3","546be36255639108002b184c"],"sync":{"url":"","isSync":false},"reference":false,"createdAt":"2014-11-18T18:31:14.459Z","from_sync":false,"order":4,"slug":"open-graph","title":"Open Graph"},"parentDoc":null,"version":{"_id":"545137a814af501a00b50cfc","project":"545137a814af501a00b50cf9","__v":11,"createdAt":"2014-10-29T18:53:28.525Z","releaseDate":"2014-10-29T18:53:28.525Z","categories":["545137a814af501a00b50cfd","545138eaa66f020800dbab4a","546b9072b47b5d1400109edf","546b9082b47b5d1400109ee0","546b9088b47b5d1400109ee1","546b909462515a14007ebc43","546b90a0b47b5d1400109ee2","546ced235884600e007a92f6","5481008eea7fd40b00cd7c2b","573b9d83ee2b3b220042291f","57be1efa15efc70e006a5f99"],"is_deprecated":false,"is_hidden":false,"is_beta":true,"is_stable":true,"codename":"","version_clean":"1.0.0","version":"1.0"},"updates":["553dbb8c1a946a0d00ad6ed1","566b75d116037b0d0085689b","57fe75bc6c9d141900d87c8b"],"next":{"pages":[],"description":""},"createdAt":"2014-11-19T00:25:06.522Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"try":true,"basic_auth":false,"results":{"codes":[]},"auth":"never","params":[],"url":""},"isReference":false,"order":5,"body":"**Single Activity Story (Non-Public)**\n\nIn this context, “non-public” means the provided URL (below), cannot be publicly accessed and scraped for OG metadata by our service.\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"https://dox.com/file/abc123\",\n      \"language\": \"text\"\n    }\n  ]\n}\n[/block]\nTherefore all OG metadata must be passed in the object section of the activity JSON.\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n  \\\"activity\\\": {\\n    \\\"actor\\\": {\\\"name\\\": \\\"Jim Patterson\\\", \\\"email\\\": \\\"jpatterson:::at:::alpinestyle.com\\\"},\\n    \\\"action\\\": \\\"create\\\",\\n    \\\"object\\\": {\\n        \\\"url\\\": \\\"https://dox.com/file/abc123.pdf\\\",\\n        \\\"description\\\": \\\"A set of charts showing the ROI of deploying Yammer over time.\\\",\\n        \\\"video\\\": {\\n            \\\"width\\\": 500,\\n            \\\"height\\\": 400\\n        },\\n        \\\"type\\\": \\\"file\\\",\\n        \\\"title\\\": \\\"Yammer ROI.pdf\\\",\\n        \\\"image\\\": \\\"https://dox.com/file/abc123.png\\\"\\n  },\\n  \\\"private\\\": \\\"false\\\",\\n  \\\"message\\\": \\\"This is the updated version for the conference.\\\",\\n  \\\"users\\\": [\\n    {\\\"name\\\": \\\"Mary Shamone\\\", \\\"email\\\" : \\\"mshamone@alpinestyle.com\\\"},\\n    {\\\"name\\\": \\\"Christina Ammerlaan\\\", \\\"email\\\" : \\\"cammerlaan@alpinestyle.com\\\"}\\n  ]\\n  }\\n}\",\n      \"language\": \"text\"\n    }\n  ]\n}\n[/block]\n\n**Example: Single Activity (Public Object)**\n\nIn this context, “public” means that all necessary OG metadata can be publicly accessed and scraped from the provided URL. When an activity’s target object has OG metadata that is publicly accessible, it is unnecessary to send any optional object metadata in the activity JSON.\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n  \\\"activity\\\": {\\n    \\\"actor\\\": {\\n      \\\"name\\\": \\\"Jim Patterson\\\",\\n      \\\"email\\\": \\\"jpatterson@alpinestyle.com\\\"\\n    },\\n    \\\"action\\\": \\\"create\\\",\\n    \\\"object\\\": {\\n      \\\"url\\\": \\\"https://dox.com/file/abc123.pdf\\\"\\n    },\\n    \\\"private\\\": \\\"false\\\",\\n    \\\"message\\\": \\\"This is the updated version for the conference.\\\",\\n    \\\"users\\\": [\\n      {\\n        \\\"email\\\": \\\"mshamone@alpinestyle.com\\\",\\n        \\\"name\\\": \\\"Mary Shamone\\\"\\n      },\\n      {\\n        \\\"email\\\": \\\"cammerlaan@alpinestyle.com\\\",\\n        \\\"name\\\": \\\"Christina Ammerlaan\\\"\\n      }\\n    ]\\n  }\\n}\",\n      \"language\": \"text\"\n    }\n  ]\n}\n[/block]\n\n**Example: Multiple Activity Stories**\n\nA third party application can send over multiple activities in one batch. Sending over multiple activities can help prevent an application from hitting the rate limits of the Yammer API.\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n  \\\"activity\\\": [\\n    {\\n      \\\"actor\\\": {\\n        \\\"name\\\": \\\"Jim Patterson\\\",\\n        \\\"email\\\": \\\"jpatterson@alpinestyle.com\\\"\\n      },\\n      \\\"action\\\": \\\"create\\\",\\n      \\\"object\\\": {\\n        \\\"type\\\": \\\"file\\\",\\n        \\\"image\\\": \\\"https://dox.com/file/abc123.jpg\\\",\\n        \\\"title\\\": \\\"Yammer ROI.pdf\\\",\\n        \\\"url\\\": \\\"https://dox.com/file/abc123.pdf\\\",\\n        \\\"description\\\": \\\"A set of charts showing the ROI of deploying Yammer over time.\\\",\\n        \\\"video\\\": {\\n          \\\"width\\\": 500,\\n          \\\"height\\\": 400\\n        }\\n      },\\n      \\\"private\\\": \\\"false\\\",\\n      \\\"message\\\": \\\"This is the updated version for the conference.\\\",\\n      \\\"users\\\": [\\n        {\\n          \\\"email\\\": \\\"mshamone@alpinestyle.com\\\",\\n          \\\"name\\\": \\\"Mary Shamone\\\"\\n        },\\n        {\\n          \\\"email\\\": \\\"cammerlaan@alpinestyle.com\\\",\\n          \\\"name\\\": \\\"Christina Ammerlaan\\\"\\n        }\\n      ]\\n    },\\n    {\\n      \\\"actor\\\": {\\n        \\\"name\\\": \\\"Jim Patterson\\\",\\n        \\\"email\\\": \\\"jpatterson@alpinestyle.com\\\"\\n      },\\n      \\\"action\\\": \\\"update\\\",\\n      \\\"object\\\": {\\n        \\\"type\\\": \\\"file\\\",\\n        \\\"image\\\": \\\"https://dox.com/file/def456.jpg\\\",\\n        \\\"title\\\": \\\"Yammer Rollout Strategy.pdf\\\",\\n        \\\"url\\\": \\\"https://dox.com/file/abc123.pdf\\\",\\n        \\\"description\\\": \\\"A customer-facing document with best practices on how to roll out a Yammer network\\\",\\n        \\\"video\\\": {\\n          \\\"width\\\": 500,\\n          \\\"height\\\": 400\\n        }\\n      },\\n      \\\"private\\\": \\\"false\\\",\\n      \\\"message\\\": \\\"I updated the table of contents to include the appendix.\\\",\\n      \\\"users\\\": [\\n        {\\n          \\\"email\\\": \\\"mshamone@alpinestyle.com\\\",\\n          \\\"name\\\": \\\"Mary Shamone\\\"\\n        },\\n        {\\n          \\\"email\\\": \\\"cammerlaan@alpinestyle.com\\\",\\n          \\\"name\\\": \\\"Christina Ammerlaan\\\"\\n        }\\n      ]\\n    }\\n  ]\\n}\",\n      \"language\": \"text\"\n    }\n  ]\n}\n[/block]","excerpt":"","slug":"sample-activities","type":"basic","title":"Sample Activities"}
**Single Activity Story (Non-Public)** In this context, “non-public” means the provided URL (below), cannot be publicly accessed and scraped for OG metadata by our service. [block:code] { "codes": [ { "code": "https://dox.com/file/abc123", "language": "text" } ] } [/block] Therefore all OG metadata must be passed in the object section of the activity JSON. [block:code] { "codes": [ { "code": "{\n \"activity\": {\n \"actor\": {\"name\": \"Jim Patterson\", \"email\": \"jpatterson@alpinestyle.com\"},\n \"action\": \"create\",\n \"object\": {\n \"url\": \"https://dox.com/file/abc123.pdf\",\n \"description\": \"A set of charts showing the ROI of deploying Yammer over time.\",\n \"video\": {\n \"width\": 500,\n \"height\": 400\n },\n \"type\": \"file\",\n \"title\": \"Yammer ROI.pdf\",\n \"image\": \"https://dox.com/file/abc123.png\"\n },\n \"private\": \"false\",\n \"message\": \"This is the updated version for the conference.\",\n \"users\": [\n {\"name\": \"Mary Shamone\", \"email\" : \"mshamone@alpinestyle.com\"},\n {\"name\": \"Christina Ammerlaan\", \"email\" : \"cammerlaan@alpinestyle.com\"}\n ]\n }\n}", "language": "text" } ] } [/block] **Example: Single Activity (Public Object)** In this context, “public” means that all necessary OG metadata can be publicly accessed and scraped from the provided URL. When an activity’s target object has OG metadata that is publicly accessible, it is unnecessary to send any optional object metadata in the activity JSON. [block:code] { "codes": [ { "code": "{\n \"activity\": {\n \"actor\": {\n \"name\": \"Jim Patterson\",\n \"email\": \"jpatterson@alpinestyle.com\"\n },\n \"action\": \"create\",\n \"object\": {\n \"url\": \"https://dox.com/file/abc123.pdf\"\n },\n \"private\": \"false\",\n \"message\": \"This is the updated version for the conference.\",\n \"users\": [\n {\n \"email\": \"mshamone@alpinestyle.com\",\n \"name\": \"Mary Shamone\"\n },\n {\n \"email\": \"cammerlaan@alpinestyle.com\",\n \"name\": \"Christina Ammerlaan\"\n }\n ]\n }\n}", "language": "text" } ] } [/block] **Example: Multiple Activity Stories** A third party application can send over multiple activities in one batch. Sending over multiple activities can help prevent an application from hitting the rate limits of the Yammer API. [block:code] { "codes": [ { "code": "{\n \"activity\": [\n {\n \"actor\": {\n \"name\": \"Jim Patterson\",\n \"email\": \"jpatterson@alpinestyle.com\"\n },\n \"action\": \"create\",\n \"object\": {\n \"type\": \"file\",\n \"image\": \"https://dox.com/file/abc123.jpg\",\n \"title\": \"Yammer ROI.pdf\",\n \"url\": \"https://dox.com/file/abc123.pdf\",\n \"description\": \"A set of charts showing the ROI of deploying Yammer over time.\",\n \"video\": {\n \"width\": 500,\n \"height\": 400\n }\n },\n \"private\": \"false\",\n \"message\": \"This is the updated version for the conference.\",\n \"users\": [\n {\n \"email\": \"mshamone@alpinestyle.com\",\n \"name\": \"Mary Shamone\"\n },\n {\n \"email\": \"cammerlaan@alpinestyle.com\",\n \"name\": \"Christina Ammerlaan\"\n }\n ]\n },\n {\n \"actor\": {\n \"name\": \"Jim Patterson\",\n \"email\": \"jpatterson@alpinestyle.com\"\n },\n \"action\": \"update\",\n \"object\": {\n \"type\": \"file\",\n \"image\": \"https://dox.com/file/def456.jpg\",\n \"title\": \"Yammer Rollout Strategy.pdf\",\n \"url\": \"https://dox.com/file/abc123.pdf\",\n \"description\": \"A customer-facing document with best practices on how to roll out a Yammer network\",\n \"video\": {\n \"width\": 500,\n \"height\": 400\n }\n },\n \"private\": \"false\",\n \"message\": \"I updated the table of contents to include the appendix.\",\n \"users\": [\n {\n \"email\": \"mshamone@alpinestyle.com\",\n \"name\": \"Mary Shamone\"\n },\n {\n \"email\": \"cammerlaan@alpinestyle.com\",\n \"name\": \"Christina Ammerlaan\"\n }\n ]\n }\n ]\n}", "language": "text" } ] } [/block]