private function _get_followers($uid)
 {
     //$weiboclient = ZombieKiller_WeiboClientFactory::create();
     $weibocilent = new SaeTClient(WB_AKEY, WB_SKEY, $_SESSION['last_key']['oauth_token'], $_SESSION['last_key']['oauth_token_secret']);
     $users = array();
     $result = $weibocilent->followers(-1, $uid);
     $users = array_merge($users, $result['users']);
     while ($next_cursor = $result['next_cursor']) {
         break;
         $result = $weibocilent->followers($next_cursor, $uid);
         $users = array_merge($users, $result['users']);
     }
     return $users;
 }
コード例 #2
0
ファイル: repost.php プロジェクト: robertniu/php
<?php

session_start();
include_once 'config.php';
include_once 'saet.ex.class.php';
header('Content-Type:text/html; charset=utf-8');
$c = new SaeTClient(WB_AKEY, WB_SKEY, $_SESSION['last_key']['oauth_token'], $_SESSION['last_key']['oauth_token_secret']);
if (isset($_REQUEST['repost'])) {
    $c->repost($_REQUEST['sid'], $_REQUEST['repost'], 1);
    echo "<p>转发回复完成</p>";
}
?>
<a href="http://pengpeng.sinaapp.com/weibolist.php" target="_blank">返回</a>
コード例 #3
0
ファイル: comment.php プロジェクト: robertniu/php
<?php

session_start();
include_once 'config.php';
include_once 'saet.ex.class.php';
header('Content-Type:text/html; charset=utf-8');
$c = new SaeTClient(WB_AKEY, WB_SKEY, $_SESSION['last_key']['oauth_token'], $_SESSION['last_key']['oauth_token_secret']);
if (isset($_REQUEST['comment'])) {
    $c->send_comment($_REQUEST['sid'], $_REQUEST['comment'], null);
    echo "<p>回复完成</p>";
}
?>
<a href="http://pengpeng.sinaapp.com/random.php" target="_blank">返回</a>
コード例 #4
0
ファイル: weibooauth.php プロジェクト: yunsite/wordbot
 function __construct($consumer_key, $consumer_secret, $oauth_token = NULL, $oauth_token_secret = NULL)
 {
     parent::__construct($consumer_key, $consumer_secret, $oauth_token, $oauth_token_secret);
 }
コード例 #5
0
ファイル: xlpic.php プロジェクト: Git-Host/gdxkc-code
<?php

if ($_POST['submit'] == '上传') {
    include_once 'saet.ex.class.php';
    $akey = '98045090';
    //AppKey
    $asec = '07fb0ec46141e0bd0563fec0f6e368ed';
    //AppSecret
    $token = 'acabbae36448457402e32290cfb67220';
    //AccessToken
    $tsec = '44b90eae427cbcfaa72ac02d97263e62';
    //AccessSecret
    $so = new SaeTClient($akey, $asec, $token, $tsec);
    $x = '#分享图片# 随机序号:' . rand(1, 99999) . '[ http://7130.sinaapp.com/ ]';
    $return = $so->upload($x, $_FILES['element_1']['tmp_name']);
    $original_pic = $return['original_pic'];
    //图片的地址
    $thumbnail_pic = $return['thumbnail_pic'];
    //缩略图地址
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>图床</title>
<link rel="stylesheet" type="text/css" href="view.css" media="all">
<script type="text/javascript" src="view.js"></script>

</head>
<body id="main_body" >
コード例 #6
0
ファイル: Submit.php プロジェクト: Git-Host/gdxkc-code
/**
 *
 *
 * @version $Id$
 * @copyright 2011
 */
$akey = '';
//應用的AppKey
$asec = '';
//應用的AppSecret
$token = '';
//用戶的AccessToken
$tsec = '';
//用戶的AccessSecret
//上面的全部要字符串
$so = new SaeTClient($akey, $asec, $token, $tsec);
if ($_POST[mid] != NULL && strlen($_POST[mid]) > 0) {
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, 'http://api.t.sina.com.cn/queryid.json?mid=' . $_POST[mid] . '&isBase62=1&type=1');
    curl_setopt($curl, CURLOPT_HEADER, 0);
    curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
    $rs = curl_exec($curl);
    curl_close($curl);
    $id = json_decode($rs)->id;
    $return = $so->repost($id, $_POST[Text1], 0);
} else {
    $return = $so->update(str_replace('\\r', '', str_replace('\\n', ' ', $_POST[Text1])), NULL, NULL, NULL, NULL);
}
if ($return['error'] != NULL) {
    echo '发布失败。<br />' . $return['error'];
} else {
コード例 #7
0
ファイル: random.php プロジェクト: robertniu/php
<?php 
session_start();
include_once 'config.php';
include_once 'saet.ex.class.php';
header('Content-Type:text/html; charset=utf-8');
$c = new SaeTClient(WB_AKEY, WB_SKEY, $_SESSION['last_key']['oauth_token'], $_SESSION['last_key']['oauth_token_secret']);
$ms = $c->public_timeline(50);
$allid = array();
$i = 0;
?>

<?php 
if (is_array($ms)) {
    foreach ($ms as $item) {
        ?>
<div style="padding:10px;margin:5px;border:1px solid #ccc">
<?php 
        //print_r($item);
        echo $item['id'];
        ?>
<br>
<?php 
        $allid[$i] = $item['id'];
        $i = $i + 1;
        ?>

<?php 
        echo $item['user']['name'];
        ?>
:
コード例 #8
0
ファイル: comment2.php プロジェクト: robertniu/php
<?php

session_start();
include_once 'config.php';
include_once 'saet.ex.class.php';
header('Content-Type:text/html; charset=utf-8');
$c = new SaeTClient(WB_AKEY, WB_SKEY, $_SESSION['last_key']['oauth_token'], $_SESSION['last_key']['oauth_token_secret']);
if (isset($_REQUEST['comment'])) {
    $pizza = $_REQUEST['sid'];
    $pieces = explode(":", $pizza);
    if (is_array($pieces)) {
        for ($i = 0; $i < sizeof($pieces); $i++) {
            $c->send_comment($pieces[$i], $i . $_REQUEST['comment'], null);
        }
    }
    echo "<p>回复完成</p>";
}
?>
<a href="http://pengpeng.sinaapp.com/random.php" target="_blank">返回</a>