def do_comment(self, *args, **kwargs): comment = messages.comment(title=_(u"Add a comment"), caption="", text="") if comment.message.get_response() == widgetUtils.OK: msg = comment.message.get_text().encode("utf-8") post = self.get_post() try: user = post[self.user_key] id = post[self.post_key] self.session.vk.client.wall.addComment(owner_id=user, post_id=id, text=msg) output.speak(_(u"You've posted a comment")) except Exception as msg: print msg
def add_comment(self, *args, **kwargs): comment = messages.comment(title=_(u"Add a comment"), caption="", text="") if comment.message.get_response() == widgetUtils.OK: msg = comment.message.get_text().encode("utf-8") try: self.session.fb.client.put_comment(self.post["id"], msg) output.speak(_(u"You've posted a comment")) if len(self.comments["data"]) < 25: self.clear_comments_list() self.get_comments() except Exception as msg: print msg
def add_comment(self, *args, **kwargs): comment = messages.comment(session=self.session, title=_(u"Add a comment"), caption="", text="") if comment.message.get_response() == widgetUtils.OK: msg = comment.message.get_text().encode("utf-8") try: user = self.post[self.user_identifier] id = self.post[self.post_identifier] self.session.vk.client.wall.addComment(owner_id=user, post_id=id, text=msg) output.speak(_(u"You've posted a comment")) if self.comments["count"] < 100: self.clear_comments_list() self.get_comments() except Exception as msg: print msg