X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=lib%2Foauthclient.php;h=0233a4b2be9468737783019f4919380bc21bfa1f;hb=faa12e63c0c7640afc47fa527a1cfa1a7091d4d0;hp=bc7587183b2c4ca8dde3878f4ccd9d5507beeded;hpb=81b6b58e33f55054b7e5dd546f06dbdb5696ed92;p=quix0rs-gnu-social.git diff --git a/lib/oauthclient.php b/lib/oauthclient.php index bc7587183b..0233a4b2be 100644 --- a/lib/oauthclient.php +++ b/lib/oauthclient.php @@ -118,18 +118,17 @@ class OAuthClient if (isset($confirm)) { if ($confirm == 'true') { - common_debug('Twitter bridge - callback confirmed.'); return $token; } else { throw new OAuthClientException( - 'Callback was not confirmed by Twitter.' + 'Callback was not confirmed by remote OAuth side.' ); } } return $token; } else { throw new OAuthClientException( - 'Could not get a request token from Twitter.' + 'Could not get a request token from remote OAuth side.' ); } } @@ -181,7 +180,7 @@ class OAuthClient return $token; } else { throw new OAuthClientException( - 'Could not get a access token from Twitter.' + 'Could not get a access token from remote OAuth side.' ); } } @@ -242,8 +241,9 @@ class OAuthClient 'ssl_verify_host' => false )); - // Twitter is strict about accepting invalid "Expect" headers - $request->setHeader('Expect', ''); + // Twitter was strict about accepting invalid "Expect" headers + // between 2008ish and October 2012. Caused "417 Expectation failed" + //$request->setHeader('Expect', ''); if (isset($params)) { $request->setMethod(HTTP_Request2::METHOD_POST);