Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
tree: 281a50095a
Fetching contributors…

Cannot retrieve contributors at this time

29 lines (25 sloc) 0.722 kB
<?php
class page_twitter extends Page {
function init(){
$oauth = $this->add("Controller_OAuth_Twitter");
if($oauth->check()){
echo "success";
}
if ($_GET["reset"]){
$oauth->resetAuthToken();
}
if ($error = $_GET["error"]){
/* could not get oAuth */
echo $error;
var_dump(base64_decode($error));
} else {
$token = $oauth->getAuthToken();
}
if ($_GET["test"]){
$tw = $this->add("SNI_Twitter");
$tw->setOAuth($oauth);
//$tw->statusUpdate(date("Y-m-d H:i:s") . "test");
print_r($tw->getUserProfile("romaninsh"));
}
}
}
Jump to Line
Something went wrong with that request. Please try again.