public int AddLike(int postId, bool needPublish)
{
this.Manager.Method("wall.addLike");
this.Manager.Params("post_id", postId);
if (needPublish)
{
this.Manager.Params("need_publish", needPublish);
}
string resp = this.Manager.Execute().GetResponseString();
if (this.Manager.MethodSuccessed)
{
XmlDocument x = this.Manager.GetXmlDocument(resp);
XmlUtils.UseNode(x.SelectSingleNode("/response"));
return XmlUtils.Int("likes");
}
return -1;
}