several oauth fixes - shred doesn't completely work yet, but it also doesn't completely NOT work, so at least there's some improvement

This commit is contained in:
friendica
2013-09-16 21:35:52 -07:00
parent 4b5d91ccb5
commit 9bff739d96
8 changed files with 781 additions and 39 deletions

View File

@@ -1823,9 +1823,13 @@ require_once('include/photos.php');
function api_oauth_request_token(&$a, $type){
try{
$oauth = new FKOAuth1();
$r = $oauth->fetch_request_token(OAuthRequest::from_request());
$req = OAuthRequest::from_request();
logger('Req: ' . var_export($req,true));
$r = $oauth->fetch_request_token($req);
}catch(Exception $e){
echo "error=". OAuthUtil::urlencode_rfc3986($e->getMessage()); killme();
logger('oauth_exception: ' . print_r($e->getMessage(),true));
echo "error=". OAuthUtil::urlencode_rfc3986($e->getMessage());
killme();
}
echo $r;
killme();
@@ -1833,7 +1837,8 @@ require_once('include/photos.php');
function api_oauth_access_token(&$a, $type){
try{
$oauth = new FKOAuth1();
$r = $oauth->fetch_access_token(OAuthRequest::from_request());
$req = OAuthRequest::from_request();
$r = $oauth->fetch_access_token($req);
}catch(Exception $e){
echo "error=". OAuthUtil::urlencode_rfc3986($e->getMessage()); killme();
}