In the Google documentation it says
// Once the user authorizes with Google, the request token can be exchanged
// for a long-lived access token. If you are building a browser-based
// application, you should parse the incoming request token from the url and
// set it in OAuthParameters before calling GetAccessToken().
but it doesn't say or show how to do that :(
Does anyone know how to do that for a desktop app?
Code samples are more than welcome!
Ok , After some time i solved it.
After you get an access token , you also get an refresh token. store that token!
Also do this parameters.AccessToken = StoredRefreshToken
and parameters.RefreshToken = StoredRefreshToken
before you make your next request call OAuthUtil.RefreshAccessToken(parameters);
And then you should be good to make a request!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With