*/
function makeStatusURI($username, $id)
{
- return 'http://twitter.com/'
+ return 'http://twitter.com/#!/'
. $username
. '/status/'
. $id;
function ensureProfile($user)
{
// check to see if there's already a profile for this user
- $profileurl = 'http://twitter.com/' . $user->screen_name;
+ $profileurl = 'http://twitter.com/#!/' . $user->screen_name;
$profile = $this->getProfileByUrl($user->screen_name, $profileurl);
if (!empty($profile)) {
static function tagLink($tag)
{
- return "<a href='https://twitter.com/search?q=%23{$tag}' class='hashtag'>{$tag}</a>";
+ return "<a href='https://search.twitter.com/search?q=%23{$tag}' class='hashtag'>{$tag}</a>";
}
static function atLink($screenName, $fullName=null)
{
if (!empty($fullName)) {
- return "<a href='http://twitter.com/{$screenName}' title='{$fullName}'>{$screenName}</a>";
+ return "<a href='http://twitter.com/#!/{$screenName}' title='{$fullName}'>{$screenName}</a>";
} else {
- return "<a href='http://twitter.com/{$screenName}'>{$screenName}</a>";
+ return "<a href='http://twitter.com/#!/{$screenName}'>{$screenName}</a>";
}
}
*/
class TwitterOAuthClient extends OAuthClient
{
- public static $requestTokenURL = 'https://twitter.com/oauth/request_token';
- public static $authorizeURL = 'https://twitter.com/oauth/authorize';
- public static $signinUrl = 'https://twitter.com/oauth/authenticate';
- public static $accessTokenURL = 'https://twitter.com/oauth/access_token';
+ public static $requestTokenURL = 'https://api.twitter.com/oauth/request_token';
+ public static $authorizeURL = 'https://api.twitter.com/oauth/authorize';
+ public static $signinUrl = 'https://api.twitter.com/oauth/authenticate';
+ public static $accessTokenURL = 'https://api.twitter.com/oauth/access_token';
/**
* Constructor
*/
function verifyCredentials()
{
- $url = 'https://twitter.com/account/verify_credentials.json';
+ $url = 'https://api.twitter.com/1/account/verify_credentials.json';
$response = $this->oAuthGet($url);
$twitter_user = json_decode($response);
return $twitter_user;
*/
function statusesUpdate($status, $params=array())
{
- $url = 'https://twitter.com/statuses/update.json';
+ $url = 'https://api.twitter.com/1/statuses/update.json';
if (is_numeric($params)) {
$params = array('in_reply_to_status_id' => intval($params));
}
function statusesHomeTimeline($since_id = null, $max_id = null,
$cnt = null, $page = null)
{
- $url = 'https://twitter.com/statuses/home_timeline.json';
+ $url = 'https://api.twitter.com/1/statuses/home_timeline.json';
$params = array('include_entities' => 'true');
function statusesFriends($id = null, $user_id = null, $screen_name = null,
$page = null)
{
- $url = "https://twitter.com/statuses/friends.json";
+ $url = "https://api.twitter.com/1/statuses/friends.json";
$params = array();
function friendsIds($id = null, $user_id = null, $screen_name = null,
$page = null)
{
- $url = "https://twitter.com/friends/ids.json";
+ $url = "https://api.twitter.com/1/friends/ids.json";
$params = array();