forked from GNUsocial/gnu-social
Twitter bridge - fix to allow linking to 'protected' Twitter users
darcs-hash:20080923074529-7b5ce-818fc75dd3a59ae2f1de1b73e1884dd8a826bd6e.gz
This commit is contained in:
parent
8957f9cf89
commit
80cd381ab0
@ -126,7 +126,7 @@ class TwittersettingsAction extends SettingsAction {
|
|||||||
|
|
||||||
// Now that we have a valid Twitter user, we have to make another api call to
|
// Now that we have a valid Twitter user, we have to make another api call to
|
||||||
// find its Twitter ID. Dumb, but true.
|
// find its Twitter ID. Dumb, but true.
|
||||||
$twitter_id = $this->get_twitter_id($twitter_username);
|
$twitter_id = $this->get_twitter_id($twitter_username, $twitter_password);
|
||||||
|
|
||||||
if (!$twitter_id) {
|
if (!$twitter_id) {
|
||||||
$this->show_form(sprintf(_('Unable to retrieve account information for "%s" from Twitter.'), $twitter_username));
|
$this->show_form(sprintf(_('Unable to retrieve account information for "%s" from Twitter.'), $twitter_username));
|
||||||
@ -235,9 +235,9 @@ class TwittersettingsAction extends SettingsAction {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
function get_twitter_id($twitter_username) {
|
function get_twitter_id($user, $password) {
|
||||||
$uri = "http://twitter.com/users/show/$twitter_username.json";
|
$uri = "http://twitter.com/users/show/$user.json";
|
||||||
$data = $this->get_twitter_data($uri);
|
$data = $this->get_twitter_data($uri, $user, $password);
|
||||||
|
|
||||||
if (!$data) {
|
if (!$data) {
|
||||||
return NULL;
|
return NULL;
|
||||||
|
Loading…
Reference in New Issue
Block a user