本文整理汇总了PHP中SaeTClientV2::upload_url_text方法的典型用法代码示例。如果您正苦于以下问题:PHP SaeTClientV2::upload_url_text方法的具体用法?PHP SaeTClientV2::upload_url_text怎么用?PHP SaeTClientV2::upload_url_text使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SaeTClientV2
的用法示例。
在下文中一共展示了SaeTClientV2::upload_url_text方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: tname
@(include_once S_ROOT . './source/weibo/config.php');
@(include_once S_ROOT . './source/weibo/saetv2.ex.class.php');
$weibo = $message;
$pic = $_POST['datapicpath'] ? 'http://i.buaa.edu.cn/' . $_SC['attachurl'] . $_POST['datapicpath'] : '';
$ToWEIBO = $_POST["sina"];
$query = $_SGLOBAL['db']->query("SELECT * FROM " . tname('spacefield') . " WHERE uid='{$uid}'");
if ($updo = $_SGLOBAL['db']->fetch_array($query)) {
$token = $updo['sina_token'];
} else {
$token = $_POST['valsina'];
}
if ($ToWEIBO) {
$setarr = array('sina_token' => $token);
updatetable('spacefield', $setarr, array('uid' => $_SGLOBAL['supe_uid']));
$c = new SaeTClientV2(WB_AKEY, WB_SKEY, $token);
$ret = $pic ? $c->upload_url_text($weibo, $pic) : $c->update($weibo);
if (isset($ret['error_code']) && $ret['error_code'] > 0) {
//showmessage($ret['error_code'].":".$ret['error']);
echo "weibo_error";
exit;
}
}
$query = $_SGLOBAL['db']->query("SELECT * FROM " . tname('feed') . " WHERE feedid='{$feedid}'");
if ($value = $_SGLOBAL['db']->fetch_array($query)) {
$value['share_url'] = get_shareurl($value['idtype'], $value['id']);
if (ckfriend($value['uid'], $value['friend'], $value['target_ids'])) {
realname_set($value['uid'], $value['username']);
$value['num'] = get_commentnum($value['idtype'], $value['id']);
}
}
$value = mkfeed($value);