send_comment() public method

对应API:{@link http://open.weibo.com/wiki/2/comments/create comments/create}
public send_comment ( integer $id, string $comment, integer $comment_ori ) : array
$id integer 需要评论的微博ID。
$comment string 评论内容,内容不超过140个汉字。
$comment_ori integer 当评论转发微博时,是否评论给原微博,0:否、1:是,默认为0。
return array
コード例 #1
0
ファイル: chuli.php プロジェクト: joaosigno/dazake-job
<?php

session_start();
include_once '../class/config.php';
include_once '../class/saetv2.ex.class.php';
header("Content-type: text/html; charset=utf-8");
$c = new SaeTClientV2(WB_AKEY, WB_SKEY, $_SESSION['weibo_token']['access_token']);
//评论功能
if (isset($_POST['pinglunid']) && isset($_POST['neirong'])) {
    $c->send_comment($_POST['pinglunid'], $_POST['neirong']);
}
//转发功能
if (isset($_POST['zhuanfaid']) && isset($_POST['zhuanfa'])) {
    $c->repost($_POST['zhuanfaid'], $_POST['zhuanfa']);
}
$pl = $c->get_comments_by_sid($_POST['weibomid']);
//获取评论列表
$bq = $c->emotions();
//读取表情
?>

<div class="submit_comment">
	<form action="">
		<textarea name="" class="comment_text" cols="30" rows="10"></textarea>
		<div class="comment_button" alt="">评论</div>
	</form>
	
	<div class="comment_biaoqing">
		<span class="comment_biaoqing_trigger"></span>
	</div>
	<div class="comment_biaoqing_floatbox hide">