Example #1
0
 function _init_oauth($access_token = null)
 {
     $this->oauth = sina_weibo_oauth($access_token);
 }
Example #2
0
function sina_weibo_api($url, $p, $method = 'POST', $oauth = null, $mutli = false)
{
    $ret = '';
    $oauth = $oauth ? $oauth : sina_weibo_oauth();
    if ($oauth) {
        if ('POST' == $method) {
            $ret = $oauth->post($url, $p, $mutli);
        } else {
            $ret = $oauth->get($url, $p);
        }
    }
    return $ret;
}