Exemplo n.º 1
0
 /// <summary>
 /// Post a message with an open graph object
 /// </summary>
 /// <param name="messageToPost">The message body</param>
 /// <param name="groupId">The group where the message will appear</param>
 /// <param name="topic">The message topic</param>
 /// <param name="og">The OpenGraph object</param>
 /// <returns>The threaded task's message object (with its returned ID)</returns>
 public Task <MessagesRootObject> PostMessageAsync(String messageToPost, long groupId, String topic, OpenGraphInMessage og)
 {
     return(this.PostAnyMessageAsync(new
     {
         body = messageToPost,
         group_id = groupId,
         topic1 = topic,
         og.og_url,
         og.og_title,
         og.og_image,
         og.og_description,
         og.og_object_type,
         og.og_site_name,
         og.og_meta,
         og.og_fetch
     }));
 }
 /// <summary>
 /// Post a message with an OpenGraph object and multiple topics.
 /// </summary>
 /// <param name="messageToPost">The messsage body</param>
 /// <param name="groupId">The group where the message will appear</param>
 /// <param name="topics">The list of topics</param>
 /// <param name="og">The OpenGraph object</param>
 /// <returns>The message object (with its returned ID)</returns>
 public MessagesRootObject PostMessage(String messageToPost, long groupId, List <String> topics, OpenGraphInMessage og)
 {
     return(this.PostAnyMessage(new
     {
         body = messageToPost,
         group_id = groupId,
         topic1 = topics[0],
         topic2 = topics[1],
         topic3 = topics[2],
         og.og_url,
         og.og_title,
         og.og_image,
         og.og_description,
         og.og_object_type,
         og.og_site_name,
         og.og_meta,
         og.og_fetch
     }));
 }