if (!defined('LACONICA')) { exit(1); }
require_once(INSTALLDIR.'/lib/omb.php');
-require_once('Auth/Yadis/Yadis.php');
class RemotesubscribeAction extends Action {
function show_form($err=NULL) {
$nickname = $this->trimmed('nickname');
+ $profile = $this->trimmed('profile_url');
common_show_header(_t('Remote subscribe'));
if ($err) {
common_element('div', 'error', $err);
}
common_element_start('form', array('id' => 'remotesubscribe', 'method' => 'POST',
'action' => common_local_url('remotesubscribe')));
- common_input('nickname', _t('User nickname'), $nickname);
- common_input('profile', _t('Profile URL'));
+ common_input('nickname', _t('User nickname'), $nickname,
+ _t('Nickname of the user you want to follow'));
+ common_input('profile_url', _t('Profile URL'), $profile,
+ _t('URL of your profile on another compatible microblogging service'));
common_submit('submit', _t('Subscribe'));
common_element_end('form');
common_show_footer();
return;
}
- $profile = $this->trimmed('profile');
+ $profile = $this->trimmed('profile_url');
if (!$profile) {
$this->show_form(_t('No such user!'));
# store all our info here
$omb['listenee'] = $user->nickname;
+ $omb['listener'] = omb_local_id($omb[OAUTH_ENDPOINT_REQUEST]);
$omb['token'] = $token;
$omb['secret'] = $secret;
+ # call doesn't work after bounce back so we cache; maybe serialization issue...?
+ $omb['access_token_url'] = omb_service_uri($omb[OAUTH_ENDPOINT_ACCESS]);
+ $omb['post_notice_url'] = omb_service_uri($omb[OMB_ENDPOINT_POSTNOTICE]);
+ $omb['update_profile_url'] = omb_service_uri($omb[OMB_ENDPOINT_UPDATEPROFILE]);
$_SESSION['oauth_authorization_request'] = $omb;