{"_id":"57194505c863120e00129fa2","user":"56abbec30b9e0b0d00616274","version":{"_id":"56abbf55f25f160d00e17f51","project":"56abbf55f25f160d00e17f4e","__v":12,"createdAt":"2016-01-29T19:36:53.665Z","releaseDate":"2016-01-29T19:36:53.665Z","categories":["56abbf56f25f160d00e17f52","56abca6bf9757e0d007c6650","56acddfa0ab3c00d00ce3332","56af65da9d32e30d0006d30f","56af66cab34d210d003d9ad0","56af6afcd21e9c0d00b628d1","56af6d6ecc4cbd0d00ce2c88","5705b12221cfed0e00e8c580","570a5676ade45d0e00c1ad33","570d7d25d1e4b82000d9e385","570eac3c3160d10e0041df0e","575709000fd6a3200010dded"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"1.0.0","version":"1.0"},"__v":1,"project":"56abbf55f25f160d00e17f4e","category":{"_id":"570a5676ade45d0e00c1ad33","__v":0,"project":"56abbf55f25f160d00e17f4e","version":"56abbf55f25f160d00e17f51","sync":{"url":"","isSync":false},"reference":true,"createdAt":"2016-04-10T13:34:46.864Z","from_sync":false,"order":3,"slug":"client-side-api","title":"Client Side API"},"parentDoc":null,"updates":[],"next":{"pages":[],"description":""},"createdAt":"2016-04-21T21:24:21.701Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":true,"order":25,"body":"[block:callout]\n{\n  \"type\": \"warning\",\n  \"title\": \"Note\",\n  \"body\": \"This feature will not function unless we have enabled it for your game. If you would like to have this feature enabled, please email us at [apps:::at:::kongregate.com](mailto:apps@kongregate.com).\"\n}\n[/block]\n### Showing the shout box\n\nIf a player is logged-in and you want to allow them to post a shout on their profile page, you may bring up the shout box, optionally populated with some initial content. The `showShoutBox` function takes the following arguments:\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Name\",\n    \"h-1\": \"Type\",\n    \"h-2\": \"Description\",\n    \"0-0\": \"`message`\",\n    \"0-1\": \"String\",\n    \"0-2\": \"The message text to add to the shout\"\n  },\n  \"cols\": 3,\n  \"rows\": 1\n}\n[/block]\nWhen the function is called, a pop-up will appear giving the player a preview of the shout, and allowing them to add their own text. Once they've done this, the message will read: \n\n`[User added text] [Text added by function call] on [Game name with link]`\n\nSo, for example, if your game \"Grind Quest MMO\" called `kongregate.services.showShoutBox(\"User43 spent 50 hours grinding to get to level 4\")`, and the user added \"I really need to get a life!\", the resulting shout would read:\n\nI really need to get a life! User43 spent 50 hours grinding to get to level 4 on [Grind Quest MMO](http://www.kongregate.com/games/BenV/kongaiLaunch)\n\n**Example** Creating a shout:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \" kongregate.services.showShoutBox(\\\"I accidentally ate the whole thing!\\\");\",\n      \"language\": \"javascript\",\n      \"name\": \"ActionScript 3\"\n    },\n    {\n      \"code\": \" kongregate.services.showShoutBox(\\\"I accidentally ate the whole thing!\\\");\",\n      \"language\": \"javascript\"\n    }\n  ]\n}\n[/block]","excerpt":"Post a shout on the user's profile page\n`showShoutBox(message)`","slug":"client-api-services-showshoutbox","type":"fn","title":"Services.ShowShoutBox"}

Services.ShowShoutBox

Post a shout on the user's profile page `showShoutBox(message)`

[block:callout] { "type": "warning", "title": "Note", "body": "This feature will not function unless we have enabled it for your game. If you would like to have this feature enabled, please email us at [apps@kongregate.com](mailto:apps@kongregate.com)." } [/block] ### Showing the shout box If a player is logged-in and you want to allow them to post a shout on their profile page, you may bring up the shout box, optionally populated with some initial content. The `showShoutBox` function takes the following arguments: [block:parameters] { "data": { "h-0": "Name", "h-1": "Type", "h-2": "Description", "0-0": "`message`", "0-1": "String", "0-2": "The message text to add to the shout" }, "cols": 3, "rows": 1 } [/block] When the function is called, a pop-up will appear giving the player a preview of the shout, and allowing them to add their own text. Once they've done this, the message will read: `[User added text] [Text added by function call] on [Game name with link]` So, for example, if your game "Grind Quest MMO" called `kongregate.services.showShoutBox("User43 spent 50 hours grinding to get to level 4")`, and the user added "I really need to get a life!", the resulting shout would read: I really need to get a life! User43 spent 50 hours grinding to get to level 4 on [Grind Quest MMO](http://www.kongregate.com/games/BenV/kongaiLaunch) **Example** Creating a shout: [block:code] { "codes": [ { "code": " kongregate.services.showShoutBox(\"I accidentally ate the whole thing!\");", "language": "javascript", "name": "ActionScript 3" }, { "code": " kongregate.services.showShoutBox(\"I accidentally ate the whole thing!\");", "language": "javascript" } ] } [/block]