Here’s the call that will allow your readers to submit comments to your event.
/event/{Event Id}/?Token={API Token}&UserName=Username&Content=This%20is%20the%20content%20of%20the%20post.
When the UserName parameter is sent with no auth token, the Content is submitted as a comment and an auth token is returned to be used in future calls.
Below is a simple example of submitting comments via our API. You need to replace xxxx with your event Id and yyyy with your API token.
<!DOCTYPE html> <html> <head> <script> var event_id = xxxx; var token = "yyyy"; function myFunction(){ var comment = document.getElementById('myTextarea').value; var username = document.getElementById('username').value; var xmlHttp = null; var theUrl = "http://apiv1.scribblelive.com/event/" + event_id + "/?Token=" + token + "&Content=" + comment + "&UserName=" + username; xmlHttp = new XMLHttpRequest(); xmlHttp.open( "GET", theUrl, false ); xmlHttp.send( null ); } </script> </head> <body> <form> Username:<input id="username" type="text" /><br/>Comment:<textarea id="myTextarea"><textarea/><br/> <button onclick="myFunction()">Submit Comment</button> </form> </body> </html>
Note: This API call is related to comments submitted via the ScribbleLive login option only.