instagrammer.MediaClient.Comment C# (CSharp) Метод

Comment() публичный Метод

Add's the comment to the media item http://instagram.com/developer/endpoints/comments/#post_media_comments
public Comment ( string mediaId, string text ) : ApiSingleResponse
mediaId string The id of the media object to add the comment to
text string The text of the comment
Результат ApiSingleResponse
        public ApiSingleResponse<Comment> Comment(string mediaId, string text)
        {
            string json = GetJSON(string.Format(ApiUrls.COMMENTS_ADD_URL, mediaId, base._token, text), string.Format("text={0}",text), "POST");
            ApiSingleResponse<Comment> response = json.Deserialize<ApiSingleResponse<Comment>>();

            return response;
        }

Usage Example

        public JsonResult Create(PhotoComment comment)
        {
            try {
                MediaClient client = new MediaClient(base.userToken.access_token);
                ApiSingleResponse<Comment> response = client.Comment(comment.id, Server.UrlEncode(comment.text));

                return Json(new { success = true });
            } catch { return Json(new { success = false }); }
        }