Post Comment to Homepage

Post Comment to Homepage – MindTouch Community Portal

Post Comment to Homepage

Table of contents

1. 1. Description of the code sample
2. 2. Sample Code
3. 3. Sample Response from executing Code
4. 4. Implementation notes

Description of the code sample

The following code example creates a new comment on the home page

Sample Code
view sourceprint?
1 Plug p = Plug.New(“http://deki-hayes/@api/deki");
2 p.At(“users", “authenticate").WithCredentials(“admin", “password").Get();
3 DreamMessahttp://developer.mindtouch.com/editor/fckeditor/core/editor/images/spacer.gifge msg = DreamMessage.Ok(MimeType.TEXT, “Comment text");
4 p.At(“pages", “home", “comments").Post(msg);

Sample Response from executing Code
view sourceprint?
01
02
03
04
05
06
07 Admin
08 Admin
09 admin@mindtouch.com
10
11 2007-08-23T09:52:07Z
12
13 1
14 Comment text
15
Implementation notes

發表迴響

你的電子郵件位址並不會被公開。 必要欄位標記為 *

What is 4 + 12 ?
Please leave these two fields as-is:
IMPORTANT! To be able to proceed, you need to solve the following simple math (so we know that you are a human) :-)