本文整理汇总了PHP中SaeTClientV2::followers_ids_by_id方法的典型用法代码示例。如果您正苦于以下问题:PHP SaeTClientV2::followers_ids_by_id方法的具体用法?PHP SaeTClientV2::followers_ids_by_id怎么用?PHP SaeTClientV2::followers_ids_by_id使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SaeTClientV2
的用法示例。
在下文中一共展示了SaeTClientV2::followers_ids_by_id方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: foreach
} else {
foreach ($sql_res as $k) {
$do_tasks[$k['user_id']] = $k['sina_uid'];
echo "{$k['nick_name']} sina_uid: {$k['sina_uid']}\n";
}
}
// 此时 $do_task 中存放的是 user_id 和 sina_uid 的键值对。
// 使用api查询任务微博的转发微博 statuses/repost_timeline/ids
$uid = 9;
// 此处需要一个具有可用token的uid
$sql = "select sina_token from user_info_sina where user_id = {$uid} limit 1";
$sql = 'select sina_token from user_info_sina where sina_token is not null and unix_timestamp(now()) < unix_timestamp(token_update_at)+token_expires_in limit 1';
$sql_res = $dbo->getRow($sql);
$c = new SaeTClientV2(WB_AKEY, WB_SKEY, $sql_res['sina_token']);
//echo "data from sina api, uid:\n";
$followers_ids = $c->followers_ids_by_id($task_uid, 0, 5);
if_weiboapi_fail($followers_ids, __FILE__, __LINE__);
if (!$followers_ids || 0 === count($followers_ids)) {
echo "nobody or nodata received from sina api";
} else {
foreach ($followers_ids['ids'] as $id) {
// echo $id."\n";
}
}
echo "failed by draft1\n";
echo "----------------------\n";
if (0 === count($do_tasks)) {
echo "nobody did the task\n";
exit;
}
if (0 === count($followers_ids)) {