本文整理汇总了PHP中SaeTClientV2::bilateral方法的典型用法代码示例。如果您正苦于以下问题:PHP SaeTClientV2::bilateral方法的具体用法?PHP SaeTClientV2::bilateral怎么用?PHP SaeTClientV2::bilateral使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SaeTClientV2
的用法示例。
在下文中一共展示了SaeTClientV2::bilateral方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getFriends
/**
* 获取好友列表
*/
public function getFriends($bind_user, $page, $count)
{
$info = unserialize($bind_user['info']);
$client = new SaeTClientV2($this->setting['app_key'], $this->setting['app_secret'], $info['access_token']);
$res = $client->bilateral($bind_user['keyid'], $page, $count);
$friends = $users = array();
foreach ($res['users'] as $u) {
$users[] = array('id' => $u['id'], 'sid' => $u['screen_name'], 'name' => $u['name'], 'avatar' => $u['profile_image_url']);
}
$friends['users'] = $users;
$friends['total_number'] = $res['total_number'];
return $friends;
}
示例2: gClass
/**
* 获取分享弹出框html,同时需要读取用户相互关注粉丝
*/
function ajax_share_content()
{
$id = @$GLOBALS['G']['url_args'][0];
if (empty($id)) {
exit;
}
$_SESSION['share_id'] = $id;
if (@$_SESSION['islogined']) {
$token = ck::get('token');
$c = new SaeTClientV2(Sconfig::$weibo['APPKEY'], Sconfig::$weibo['APPSECRET'], $token['access_token']);
//TODO: 获取用户互相关注用户列表
$friends = $c->bilateral($token['uid'], 1, 100);
$this->friends = $friends['users'];
$ext_info = gClass('ExtStorage')->find_one($id);
$detailpicArr = json_decode($ext_info['descpic'], true);
$ext_info['detailpic'] = $detailpicArr[0];
$this->ext_info = $ext_info;
//授权用户详细信息
$userinfo = $c->show_user_by_id($token['uid']);
//取得微博发布内容
require SITE_PATH . 'include/weibo_content.php';
$this->weibo_content = rand_content($cfg_content, $this->ext_info);
$nick = !empty($userinfo['screen_name']) ? $userinfo['screen_name'] : $userinfo['name'];
exit(json_encode(array('status' => 'success', 'html' => $this->display('extensions/share.html', false), 'nick' => $nick)));
}
exit(json_encode(array('status' => 'error', 'msg' => '未登录')));
}
示例3: SelectTag
$idgenderimg = "<em class=\"W_ico12 female\" title=\"女\"></em>";
}
if ($user_message['gender'] == "f") {
$idgender = "m";
$idgenderimg = "<em class=\"W_ico12 male\" title=\"男\"></em>";
}
if ($totalbill < 200) {
$page_a = 1;
}
if ($totalbill % 200) {
$page_a = (int) ($totalbill / 200) + 1;
} else {
$page_a = $totalbill / 200;
}
for ($page_b = 1; $page_b <= $page_a; $page_b++) {
$f_byid = $c->bilateral($uid, $page_b, 200);
//根据ID获取用户的互粉列表
if (is_array($f_byid['users'])) {
foreach ($f_byid['users'] as $item_u) {
if ($item_u['gender'] == $idgender) {
$arrid[$countsex] = $item_u['id'];
$arrname[$countsex] = $item_u['screen_name'];
$arrimg[$countsex] = $item_u['profile_image_url'];
$arrdes[$countsex] = $item_u['description'];
$arrloc[$countsex] = $item_u['location'];
$countsex++;
}
}
}
}
function SelectTag($tag)
示例4: array
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>新浪萝卜 -- Powered by Sina App Engine</title>
</head>
<body><?php
echo $user_message['screen_name'];
?>
,您好!
<form name="pyl" action = "result.php" method = "post">
<?php
$f_byid = $c->bilateral($uid, 0, 200);
//根据ID获取用户的互粉列表
$sortsid = array();
$i = 0;
$countsex = 0;
$countcity = 0;
if (is_array($f_byid['users'])) {
foreach ($f_byid['users'] as $item_u) {
if ($item_u['gender'] == "f") {
echo '<div style="padding:10px;margin:5px;border:1px solid #ccc">';
//echo '####################################<br>';
$countsex++;
echo $item_u['id'] . '<br>';
echo $item_u['screen_name'] . ':<br>';
?>
<img src= <?php