tags:

views:

49

answers:

1

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 =  defaultProvider(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) ?

A: 

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.

BrennaSoft
Can you tell me what exactly should I do with Singpost? to run don Park's code? Looks like Singposit use String authUrl = provider.retrieveRequestToken(OAuth.OUT_OF_BAND);to send request? and then user bufferread to read the inputstream(request token?)
bitma
Ignore Don Park's code. Check out the Twitter Example with Signpost.http://github.com/kaeppler/signpost-examples/blob/master/OAuthTwitterExample/src/TwitterMain.java
BrennaSoft
I want to write android app which communicate with opensocial, so I have to figure out how can I send the request for request token, I checked twitter and google example from signpost, but I still cant understand how this work. String authUrl = provider.retrieveRequestToken(OAuth.OUT_OF_BAND);I need to find out how the client code to send request and recieve request token from server.
bitma