POST comments/update
Update a comment
URL:
http://mobileroadie.com/api/comments/update
Formats
XML, JSON, HTML
Requirements
SSL, API Secret, White-Listed IP Address
HTTP Method(s):
POST
URL Parameter(s):
-
key
-
Required
-
POST Parameters:
-
secret
-
Required.
-
-
id
-
Required. Id of existing entry.
-
-
type
-
Required. The content section to post the comment to. Available types provided by comments/gettypes
-
-
body
-
Required. The text of the comment.
-
-
nickname
-
Username of the comment poster.
-
-
profile_image
-
URL of profile image of the comment poster. Image will be auto-cropped to 50px by 50px.
-
-
parent_id
-
Required. ID of the parent thread. You can Default this to 0.
-
-
item_id
-
Required for all types except fanwall. ID of the content item the comment is in reference to.
-
Usage Example
<?php $data = array( 'secret' => 'your_secret_key', 'id' => '12345', 'type' => 'fanwall', 'body' => 'I love this app!', 'nickname' => 'moro', 'profile_image' => 'http://mobileroadie.com/img/default-image.png', 'parent_id' => '0', 'item_id' => '' ); $handle = curl_init("https://mobileroadie.com/api/comments/update/key/4d4ba30d73b77f7"); curl_setopt($handle CURLOPT_HTTPAUTH, CURLAUTH_ANY); curl_setopt($handle, CURLOPT_POST, true); curl_setopt($handle, CURLOPT_POSTFIELDS, $data); $response = curl_exec($handle); curl_close($handle); ?>
Success Response
<xml> <id>12345</id> </xml>
Response when Missing Required Fields
<xml> <error>[FieldName1] is required. [FieldNameX] is required.</error> </xml>
Comments
0 comments
Please sign in to leave a comment.