Hello Guys,

I'm basing on the BUZZ OAUTH Sample that is available at
http://code.google.com/p/google-api-java-client/

However in stuck in this part, anyone can help me?

GoogleOAuthGetTemporaryToken temporaryToken = new
GoogleOAuthGetTemporaryToken();
 //temporaryToken.transport = Util.AUTH_TRANSPORT;
signer = new OAuthHmacSigner();
 signer.clientSharedSecret = ConsumerCredentials.OAUTH_CONSUMER_KEY;
temporaryToken.signer = signer;
 temporaryToken.consumerKey = ConsumerCredentials.OAUTH_CONSUMER_SECRET;
temporaryToken.scope = "https://apps-apis.google.com/a/feeds/";;
 temporaryToken.displayName = AppInfo.APP_DESCRIPTION;
System.out.println(temporaryToken.build());
 OAuthCredentialsResponse tempCredentials = temporaryToken.execute();
signer.tokenSharedSecret = tempCredentials.tokenSecret;


It returns a NullPointer however i can't find what is missing

https://www.google.com/accounts/OAuthGetRequestToken?scope=https://apps-apis.google.com/a/feeds/&xoauth_displayname=Google-API-JAVA-CLIENT-SAMPLE

Exception in thread "main" java.lang.NullPointerException
at
com.google.api.client.auth.oauth.AbstractOAuthGetToken.execute(AbstractOAuthGetToken.java:69)
 at GroupSettingTests.main(GroupSettingTests.java:30)




Alexandre Jacquet

Google Apps Deployment Specialst
São Paulo | SP | Brasil
Tel.: 55 11 8064 6882





On Tue, Jun 14, 2011 at 12:21 PM, Michael Manoochehri <
[email protected]> wrote:

> Also, I recommend using the HMAC-SHA1 method for this sample, as you can
> simply provide your consumer key and secret without providing a private key
> to sign OAuth requests.
>
> Michael.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google Apps Domain Information and Management APIs" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/google-apps-mgmt-apis/-/ifDgqtSbtUUJ.
>
> To post to this group, send email to
> [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> For more options, visit this group at
> http://groups.google.com/group/google-apps-mgmt-apis?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Apps Domain Information and Management APIs" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-apps-mgmt-apis?hl=en.

Reply via email to