change to https style urls for twitter api (http://board.s9y.org/viewtopic.php?f=10&t=19695)
This commit is contained in:
parent
35f7f30e51
commit
abdacc84f7
|
@ -8,6 +8,13 @@ TODO:
|
|||
* Twitter announcements/credentials etc. per author instead of
|
||||
only per central blog
|
||||
|
||||
1.60
|
||||
--------------------------
|
||||
|
||||
* Adapted http://twitter.com to https://twitter.com due to Twitter
|
||||
enforcing SSL now (well, they could have done a redirect to be nice
|
||||
to people, but...)
|
||||
|
||||
1.51 (mattsches)
|
||||
--------------------------
|
||||
* Switched tweetback search to API 1.1
|
||||
|
|
|
@ -47,7 +47,7 @@ class Twitter {
|
|||
return "http://identi.ca/";
|
||||
}
|
||||
else {
|
||||
return "http://twitter.com/";
|
||||
return "https://twitter.com/";
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -61,7 +61,7 @@ class Twitter {
|
|||
}
|
||||
else {
|
||||
//TODO: Change Twtter API to 1.1
|
||||
return "http://twitter.com/";
|
||||
return "https://twitter.com/";
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -76,7 +76,7 @@ class Twitter {
|
|||
}
|
||||
else {
|
||||
//TODO: Change Twtter API to 1.1
|
||||
return "http://search.twitter.com/search";
|
||||
return "https://search.twitter.com/search";
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -99,7 +99,7 @@ class TwitterOAuthApi {
|
|||
* @access private
|
||||
*/
|
||||
static function get_base_url() {
|
||||
return "http://twitter.com/";
|
||||
return "https://twitter.com/";
|
||||
}
|
||||
|
||||
static function parse_entry_json( $item ) {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<?php
|
||||
|
||||
// Actual version of both plugins
|
||||
@define('PLUGIN_TWITTER_VERSION', '1.51');
|
||||
@define('PLUGIN_TWITTER_VERSION', '1.60');
|
||||
|
|
|
@ -1861,7 +1861,7 @@ a.twitter_update_time {
|
|||
$error=200; // Default is: All OK
|
||||
|
||||
if (!empty($idx_twitter)) {
|
||||
$search_twitter_uri = 'http://api.twitter.com/1.1/statuses/user_timeline.json?screen_name=' . $username . '&count=' . $number . '&trim_user=true';
|
||||
$search_twitter_uri = 'https://api.twitter.com/1.1/statuses/user_timeline.json?screen_name=' . $username . '&count=' . $number . '&trim_user=true';
|
||||
if (!$show_rt) $search_twitter_uri .= '&include_rts=false';
|
||||
if ($idx_twitter=='1') $idx_twitter=''; // First cfg is saved with empty suffix!
|
||||
$connection = $this->twitteroa_connect($idx_twitter);
|
||||
|
@ -1880,11 +1880,11 @@ a.twitter_update_time {
|
|||
}
|
||||
else
|
||||
{
|
||||
$followme_url = 'http://twitter.com/' . $username;
|
||||
$service_url = 'http://twitter.com';
|
||||
$status_url = 'http://twitter.com/' . $username . '/statuses/';
|
||||
$followme_url = 'https://twitter.com/' . $username;
|
||||
$service_url = 'https://twitter.com';
|
||||
$status_url = 'https://twitter.com/' . $username . '/statuses/';
|
||||
$JSONcallback = 'twitterCallback2';
|
||||
$search_twitter_uri = 'http://api.twitter.com/1/statuses/user_timeline.json?screen_name=' . $username . '&count=' . $number;
|
||||
$search_twitter_uri = 'https://api.twitter.com/1/statuses/user_timeline.json?screen_name=' . $username . '&count=' . $number;
|
||||
}
|
||||
|
||||
serendipity_request_start();
|
||||
|
|
|
@ -270,11 +270,11 @@ class serendipity_plugin_twitter extends serendipity_plugin {
|
|||
}
|
||||
else // if ($this->get_config('twitter_api','1.0') == '1.0')
|
||||
{
|
||||
$followme_url = 'http://twitter.com/' . $username;
|
||||
$service_url = 'http://twitter.com';
|
||||
$status_url = 'http://twitter.com/' . $username . '/statuses/';
|
||||
$followme_url = 'https://twitter.com/' . $username;
|
||||
$service_url = 'https://twitter.com';
|
||||
$status_url = 'https://twitter.com/' . $username . '/statuses/';
|
||||
$JSONcallback = 'twitterCallback2';
|
||||
$timelineurl = 'http://api.twitter.com/1/statuses/user_timeline.json?screen_name=' . $username . '&count=' . $number . '&callback=' . $JSONcallback;
|
||||
$timelineurl = 'https://api.twitter.com/1/statuses/user_timeline.json?screen_name=' . $username . '&count=' . $number . '&callback=' . $JSONcallback;
|
||||
$api = new Twitter(false);
|
||||
}
|
||||
|
||||
|
@ -349,7 +349,7 @@ class serendipity_plugin_twitter extends serendipity_plugin {
|
|||
} else {
|
||||
if (!$hideDisplay) {
|
||||
echo '<ul id="twitter_update_list"><li style="display: none"></li></ul>' . "\n";
|
||||
echo '<script type="text/javascript" src="http://twitter.com/javascripts/blogger.js"></script>' . "\n";
|
||||
echo '<script type="text/javascript" src="https://twitter.com/javascripts/blogger.js"></script>' . "\n";
|
||||
echo '<script type="text/javascript" src="' . $timelineurl . '"></script>';
|
||||
}
|
||||
}
|
||||
|
@ -436,10 +436,10 @@ class serendipity_plugin_twitter extends serendipity_plugin {
|
|||
$status_url = 'http://identi.ca/notice/';
|
||||
$search_twitter_uri = $service_url . '/statuses/user_timeline/' . $username . '.json?count=' . $number;
|
||||
} else {
|
||||
$followme_url = 'http://twitter.com/' . $username;
|
||||
$service_url = 'http://api.twitter.com';
|
||||
$status_url = 'http://twitter.com/' . $username . '/statuses/';
|
||||
$search_twitter_uri = 'http://api.twitter.com/1/statuses/user_timeline.json?screen_name=' . $username . '&count=' . $number;
|
||||
$followme_url = 'https://twitter.com/' . $username;
|
||||
$service_url = 'https://api.twitter.com';
|
||||
$status_url = 'https://twitter.com/' . $username . '/statuses/';
|
||||
$search_twitter_uri = 'https://api.twitter.com/1/statuses/user_timeline.json?screen_name=' . $username . '&count=' . $number;
|
||||
}
|
||||
|
||||
serendipity_request_start();
|
||||
|
@ -586,9 +586,9 @@ class serendipity_plugin_twitter extends serendipity_plugin {
|
|||
|
||||
if ($last_backup < 1) {
|
||||
// First time backup. Grab everything we can get.
|
||||
$this->twitterGet('http://api.twitter.com/1/statuses/user_timeline.json?screen_name=' . $username . '&count=100&page=');
|
||||
$this->twitterGet('https://api.twitter.com/1/statuses/user_timeline.json?screen_name=' . $username . '&count=100&page=');
|
||||
} else {
|
||||
$this->twitterGet('http://api.twitter.com/1/statuses/user_timeline.json?screen_name=' . $username . '&count=100&since_id=' . $this->get_config('last_tweetid') . '&page=');
|
||||
$this->twitterGet('https://api.twitter.com/1/statuses/user_timeline.json?screen_name=' . $username . '&count=100&since_id=' . $this->get_config('last_tweetid') . '&page=');
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue