开发者

android OAuth question, how to send request for request token

开发者 https://www.devze.com 2023-01-05 21:39 出处:网络
in Don Park\'s example :http://donpark.org/blog/2009/01/24/android-client-side-oauth I am confused about step2.

in Don Park's example :http://donpark.org/blog/2009/01/24/android-client-side-oauth

I am confused about step2.

there is such a lane:

OAuthAccessor defaultClient() {
String callbackUrl = "icecondor-android-app:///";
OAuthServiceProvider provider =  defaultProvide开发者_StackOverflow中文版r(ctx);
OAuthConsumer consumer = new OAuthConsumer(callbackUrl, consumerKey,
                                consumerSecret, provider);
OAuthAccessor accessor = new OAuthAccessor(consumer);
OAuthClient client = new OAuthClient(new HttpClient4());
}

I dont know where did we send request for request token? where is the return ? should we return accessor?

I think there should be something like client.excute(request_url and parameters) ?


You are partially correct, he seems to have omitted that step. You need to use your oauth key,secret,timestamp,etc and send a request to the API to obtain the request token.

Signpost is java library that I have successfully used on Android to simplify using OAuth.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号