![Picture of Markus S. Picture of Markus S.](/graphics/unknown.gif)
Markus S. - 2013-05-29 13:48:46
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']; ?