{"_id":"547382311a20c70800e1897a","project":"545137a814af501a00b50cf9","parentDoc":null,"githubsync":"","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"},"__v":8,"user":"5433099f9a2b451a00ad4531","category":{"_id":"546b9082b47b5d1400109ee0","pages":["54737d5f1a20c70800e1895f","54737d801a20c70800e18961","54737d95007eb108007e03a8","547381da007eb108007e03c7","547382311a20c70800e1897a","55761ac11ce9e6370050137b"],"project":"545137a814af501a00b50cf9","version":"545137a814af501a00b50cfc","__v":6,"sync":{"url":"","isSync":false},"reference":false,"createdAt":"2014-11-18T18:31:30.383Z","from_sync":false,"order":8,"slug":"yammer-embed","title":"Yammer Embed"},"updates":["553f899a6a7d010d0057c847","5575e547acd0472d000aca46"],"next":{"pages":[],"description":""},"createdAt":"2014-11-24T19:08:33.660Z","link_external":false,"link_url":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","try":true,"basic_auth":false,"auth":"never","params":[],"url":""},"isReference":false,"order":4,"body":"The Yammer Embed component also features a simple eventing system that developers can take advantage of to handle various events in the system.\n\nTo listen to an event, use:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \" yam.on(eventId, callbackFunction, [context]);\",\n      \"language\": \"text\"\n    }\n  ]\n}\n[/block]\nTo stop listening to an event, use:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"yam.off(eventId, callbackFunction, [context]);\",\n      \"language\": \"text\"\n    }\n  ]\n}\n[/block]\nArguments:\n  * eventId – Identifier of the event (see list below)\n  * callbackFunction – JavaScript function that handles the event.\n  * context – An optional object that contains state that is passed to your function handler. \n\n**Events** \n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Event Name\",\n    \"h-1\": \"Event Id\",\n    \"h-2\": \"Description\",\n    \"0-0\": \"Error\",\n    \"0-1\": \"error\",\n    \"0-2\": \"An error has occurred while loading the embed component.\",\n    \"1-0\": \"Logged In\",\n    \"1-1\": \"/embed/loggedIn\",\n    \"1-2\": \"The user has logged in to Yammer via the embed component.\",\n    \"2-0\": \"Logged Out\",\n    \"2-1\": \"/embed/loggedOut\",\n    \"2-2\": \"The user has logged out from Yammer via the embed component.\",\n    \"3-0\": \"Loading Completed\",\n    \"3-1\": \"/embed/feed/loadingCompleted\",\n    \"3-2\": \"The embed component has completed loading and is ready to display.\",\n    \"4-0\": \"(All)\",\n    \"4-1\": \"all\",\n    \"4-2\": \"Captures all events listed above as they are triggered from the embed component.\"\n  },\n  \"cols\": 3,\n  \"rows\": 5\n}\n[/block]\n\n**Skinny Mode (Beta)**\n\nIf you configure any embedded feed to be less than 400px wide, the embedded feed will switch to skinny mode. The user experience for feeds in skinny mode is much less feature-rich. Most clickable UI elements will take users to the appropriate place in the full Yammer.com site.","excerpt":"","slug":"feed-events","type":"basic","title":"Feed Events"}
The Yammer Embed component also features a simple eventing system that developers can take advantage of to handle various events in the system. To listen to an event, use: [block:code] { "codes": [ { "code": " yam.on(eventId, callbackFunction, [context]);", "language": "text" } ] } [/block] To stop listening to an event, use: [block:code] { "codes": [ { "code": "yam.off(eventId, callbackFunction, [context]);", "language": "text" } ] } [/block] Arguments: * eventId – Identifier of the event (see list below) * callbackFunction – JavaScript function that handles the event. * context – An optional object that contains state that is passed to your function handler. **Events** [block:parameters] { "data": { "h-0": "Event Name", "h-1": "Event Id", "h-2": "Description", "0-0": "Error", "0-1": "error", "0-2": "An error has occurred while loading the embed component.", "1-0": "Logged In", "1-1": "/embed/loggedIn", "1-2": "The user has logged in to Yammer via the embed component.", "2-0": "Logged Out", "2-1": "/embed/loggedOut", "2-2": "The user has logged out from Yammer via the embed component.", "3-0": "Loading Completed", "3-1": "/embed/feed/loadingCompleted", "3-2": "The embed component has completed loading and is ready to display.", "4-0": "(All)", "4-1": "all", "4-2": "Captures all events listed above as they are triggered from the embed component." }, "cols": 3, "rows": 5 } [/block] **Skinny Mode (Beta)** If you configure any embedded feed to be less than 400px wide, the embedded feed will switch to skinny mode. The user experience for feeds in skinny mode is much less feature-rich. Most clickable UI elements will take users to the appropriate place in the full Yammer.com site.