{"_id":"546be36255639108002b184c","project":"545137a814af501a00b50cf9","user":"5433099f9a2b451a00ad4531","__v":6,"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"},"githubsync":"","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"},"metadata":{"title":"","description":"","image":[]},"updates":["553dbb8c1a946a0d00ad6ed1","566b75d116037b0d0085689b","57fe75bc6c9d141900d87c8b"],"next":{"pages":[],"description":""},"createdAt":"2014-11-19T00:25:06.522Z","link_external":false,"link_url":"","sync_unique":"","hidden":false,"api":{"try":true,"basic_auth":false,"results":{"codes":[]},"settings":"","auth":"never","params":[],"url":""},"isReference":false,"order":5,"body":"**(Please note: Open Graph Activities from 3rd party apps are now deprecated as the activity ticker is deprecated. Refer to OGA Announcement Section)**\n\n**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\\\" : \\\"[email protected]\\\"},\\n    {\\\"name\\\": \\\"Christina Ammerlaan\\\", \\\"email\\\" : \\\"[email protected]\\\"}\\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\\\": \\\"[email protected]\\\"\\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\\\": \\\"[email protected]\\\",\\n        \\\"name\\\": \\\"Mary Shamone\\\"\\n      },\\n      {\\n        \\\"email\\\": \\\"[email protected]\\\",\\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\\\": \\\"[email protected]\\\"\\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\\\": \\\"[email protected]\\\",\\n          \\\"name\\\": \\\"Mary Shamone\\\"\\n        },\\n        {\\n          \\\"email\\\": \\\"[email protected]\\\",\\n          \\\"name\\\": \\\"Christina Ammerlaan\\\"\\n        }\\n      ]\\n    },\\n    {\\n      \\\"actor\\\": {\\n        \\\"name\\\": \\\"Jim Patterson\\\",\\n        \\\"email\\\": \\\"[email protected]\\\"\\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\\\": \\\"[email protected]\\\",\\n          \\\"name\\\": \\\"Mary Shamone\\\"\\n        },\\n        {\\n          \\\"email\\\": \\\"[email protected]\\\",\\n          \\\"name\\\": \\\"Christina Ammerlaan\\\"\\n        }\\n      ]\\n    }\\n  ]\\n}\",\n      \"language\": \"text\"\n    }\n  ]\n}\n[/block]\n\n\nChanges due to Open Graph Actions deprecation:\n\n\nThese parameters need to be passed \n\n{\n  \"user_client\":{\n    \"id\":10,\n    \"type\":\"AndroidGCMPushDevice\",\n    \"network_id\":99,\n    \"client_id\":\"some-test-client\"\n  },\n  \"template\":\"mark_read\",\n  \"user\":{\n    \"id\":1,\n    \"meta_user_id\":2\n  },\n  \"message_id\":1001,\n  \"thread_id\":1002\n}\n\n\ninstead of this in parameters \n\n{\n  \"activity\": {\n    \"actor\": {\"name\": \"Jim Patterson\", \"email\": \"[email protected]\"},\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\" : \"[email protected]\"},\n    {\"name\": \"Christina Ammerlaan\", \"email\" : \"[email protected]\"}\n  ]\n  }\n}","excerpt":"","slug":"sample-activities","type":"basic","title":"Sample Activities"}
**(Please note: Open Graph Activities from 3rd party apps are now deprecated as the activity ticker is deprecated. Refer to OGA Announcement Section)** **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\": \"[email protected]\"},\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\" : \"[email protected]\"},\n {\"name\": \"Christina Ammerlaan\", \"email\" : \"[email protected]\"}\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\": \"[email protected]\"\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\": \"[email protected]\",\n \"name\": \"Mary Shamone\"\n },\n {\n \"email\": \"[email protected]\",\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\": \"[email protected]\"\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\": \"[email protected]\",\n \"name\": \"Mary Shamone\"\n },\n {\n \"email\": \"[email protected]\",\n \"name\": \"Christina Ammerlaan\"\n }\n ]\n },\n {\n \"actor\": {\n \"name\": \"Jim Patterson\",\n \"email\": \"[email protected]om\"\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\": \"[email protected]\",\n \"name\": \"Mary Shamone\"\n },\n {\n \"email\": \"[email protected]\",\n \"name\": \"Christina Ammerlaan\"\n }\n ]\n }\n ]\n}", "language": "text" } ] } [/block] Changes due to Open Graph Actions deprecation: These parameters need to be passed { "user_client":{ "id":10, "type":"AndroidGCMPushDevice", "network_id":99, "client_id":"some-test-client" }, "template":"mark_read", "user":{ "id":1, "meta_user_id":2 }, "message_id":1001, "thread_id":1002 } instead of this in parameters { "activity": { "actor": {"name": "Jim Patterson", "email": "[email protected]"}, "action": "create", "object": { "url": "https://dox.com/file/abc123.pdf", "description": "A set of charts showing the ROI of deploying Yammer over time.", "video": { "width": 500, "height": 400 }, "type": "file", "title": "Yammer ROI.pdf", "image": "https://dox.com/file/abc123.png" }, "private": "false", "message": "This is the updated version for the conference.", "users": [ {"name": "Mary Shamone", "email" : "[email protected]"}, {"name": "Christina Ammerlaan", "email" : "[email protected]"} ] } }