예제 #1
0
 public function getFeed()
 {
     $oauthParams = (object) array();
     $oauthParams->apiKey = $this->API_KEY;
     $oauthParams->apiSecret = $this->API_SECRET;
     $oauthParams->tokenKey = $this->OAUTH_USER_TOKEN;
     $oauthParams->tokenSecret = $this->OAUTH_USER_SECRET;
     $params = array();
     $params["screen_name"] = "taivasfi";
     //$params["count"] = "8";
     $params = (object) $params;
     $url = OAuth::createOAuth("https://api.twitter.com/1.1/statuses/user_timeline.json", $oauthParams, $params, false);
     $data = $this->getURL($url);
     return $data;
 }
예제 #2
0
 public function getFeed()
 {
     $oauthParams = (object) array();
     $oauthParams->apiKey = $this->API_KEY;
     $oauthParams->apiSecret = $this->API_SECRET;
     $oauthParams->tokenKey = $this->OAUTH_USER_TOKEN;
     $oauthParams->tokenSecret = $this->OAUTH_USER_SECRET;
     $params = array();
     $params["event-type"] = "status-update";
     $params["format"] = "json";
     $params = (object) $params;
     $url = OAuth::createOAuth("http://api.linkedin.com/v1/companies/16019/updates", $oauthParams, $params);
     //die($url);
     $data = $this->getURL($url);
     return $data;
 }
예제 #3
0
&event-type%3Dstatus-update%26format%3Djson%26
oauth_consumer_key%3D77rggpkbr2jf9r%26
oauth_nonce%3D3334341234%26
oauth_signature_method%3DHMAC-SHA1%26
oauth_timestamp%3D1386345627%26
oauth_token%3D4005c9be-7414-4ec6-b89f-87bdf0bb715f%26
oauth_version%3D1.0




		if(!isset($ret->tokenKey)) $ret->tokenKey = FlickrHA::$tokenKey;
		if(!isset($ret->tokenSecret)) $ret->tokenSecret = FlickrHA::$tokenSecret;
		if(!isset($ret->format)) $ret->format = FlickrParamsHA::PHPFORMAT; 
*/
$url = OAuth::createOAuth("http://api.linkedin.com/v1/companies/16019/updates", $oauthParams, $params);
echo "<br>GET&http%3A%2F%2Fapi.linkedin.com%2Fv1%2Fcompanies%2F16019%2Fupdates&event-type%3Dstatus-update%26format%3Djson%26oauth_consumer_key%3D77rggpkbr2jf9r%26oauth_nonce%3D3334341234%26oauth_signature_method%3DHMAC-SHA1%26oauth_timestamp%3D1386345627%26oauth_token%3D4005c9be-7414-4ec6-b89f-87bdf0bb715f%26oauth_version%3D1.0";
echo "<br><br>vpSOM0kdQuH5JZettoRSCTCCskI=<br><br>";
die($url);
// OAuth 2 Control Flow
/*if (isset($_GET['error'])) {
    // LinkedIn returned an error
    print $_GET['error'] . ': ' . $_GET['error_description'];
    exit;
} elseif (isset($_GET['code'])) {
    // User authorized your application
    if ($_SESSION['state'] == $_GET['state']) {
        // Get token so you can make API calls
        getAccessToken();
    } else {
        // CSRF attack? Or did you mix up your states?