From 9bff739d9624d3a4ba1fb488673ec1a18bc6d395 Mon Sep 17 00:00:00 2001 From: friendica Date: Mon, 16 Sep 2013 21:35:52 -0700 Subject: several oauth fixes - shred doesn't completely work yet, but it also doesn't completely NOT work, so at least there's some improvement --- include/api.php | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'include/api.php') diff --git a/include/api.php b/include/api.php index a49258d18..d76d82626 100644 --- a/include/api.php +++ b/include/api.php @@ -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(); } -- cgit v1.2.3