SaeTClientV2::emotions PHP Method

emotions() public method

返回新浪微博官方所有表情、魔法表情的相关信息。包括短语、表情类型、表情分类,是否热门等。
对应API:{@link http://open.weibo.com/wiki/2/emotions emotions}
public emotions ( string $type = "face", string $language = "cnname" ) : array
$type string 表情类别。"face":普通表情,"ani":魔法表情,"cartoon":动漫表情。默认为"face"。可选。
$language string 语言类别,"cnname"简体,"twname"繁体。默认为"cnname"。可选
return array
    function emotions($type = "face", $language = "cnname")
    {
        $params = array();
        $params['type'] = $type;
        $params['language'] = $language;
        return $this->oauth->get('emotions', $params);
    }

Usage Example

コード例 #1
0
ファイル: chuli.php プロジェクト: joaosigno/dazake-job
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">
		<ul>
			<?php 
SaeTClientV2