|I got the following error|
OAuthException: Error validating verification code. Please make sure your redirect_uri is identical to the one you used in the OAuth dialog request.
this happens because I used the following redirect URI.
$client->redirect_uri = 'http://'.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'];
when using a static redirect uri, or one which does not depend on the current URL of the script it works like a charm.
the problem is, that the oauth client redirect to itself and appends some parameter which slip into the redirect_uri when defined like above.
How to work arround this problem? could the oauth_client_class define a helper method which would strip all oauth related params from a given url, so one could define a redirect_uri like 'http://'.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI']; ?
|2013-05-30 00:38:34 - In reply to message 1 from Markus S.|
|You should use the script name instead of $_SERVER['REQUEST_URI'] just like in the examples.|
|2013-05-31 06:48:59 - In reply to message 2 from Manuel Lemos|
|the expression vom the example doesn't work for me, because the oauth login is behind a url which already contains a parameter|
|2013-05-31 15:37:23 - In reply to message 3 from Markus S.|
|You should use whatever works for you, just not $_SERVER['REQUEST_URI'] because it will include request parameters that will be duplicated by the class when it appends the parameters needed by the OAuth protocol.|