I am implementing google buzz API integration with android. I have successfully done with the OAuth and got the AccessToken. But when I am trying to POST the message on Buzz it replying me with Status 401 with below reponse.
{"error":{"errors":[{"domain":"global","reason":"invalid","message":"Token invalid - Invalid AuthSub token.","locationType":"header","location":"Authorization"}],"code":401,"message":"Token invalid - Invalid AuthSub token."}}
I used singpost library for oAuth and below is the code which I am using to post a message to BUZZ.
String serurl = "https://www.googleapis.com/buzz/v1/activities/@me/@self?key=@@KEY&alt=json";
serurl = serurl.replace("@@KEY", AppSettings.GOOGLE_API_KEY);
CommonsHttpOAuthConsumer consumer = new CommonsHttpOAuthConsumer(
                    AppSettings.GOOGLE_CONSUMER_KEY,
                    AppSettings.GOOGLE_CONSUMER_SECRET);
consumer.setMessageSigner(new HmacSha1MessageSigner());
consumer.setTokenWithSecret(destination.AccessToken,
                    destination.AccessTokenSecret);
String bstr = "{\"data\": {\"object\": {\"type\": \"note\",\"content\": \""
                + msg + "\"}}}";
HttpClient client = new DefaultHttpClient();
HttpPost method = new HttpPost(consumer.sign(serurl));
method.setHeader("Content-Type", "application/json");
method.addHeader("Accept", "application/json");
method.addHeader("Authorization", URLEncoder.encode(destination.AccessToken));
method.setEntity(new StringEntity(bstr, "UTF-8"));
HttpResponse response = client.execute(method);
final HttpEntity entity = response.getEntity();
String responseString = "";
if (entity != null) {
    InputStream inputStream = null;
    try {
         inputStream = entity.getContent();
          responseString = Utils.convertinputStreamToString(new Utils.FlushedInputStream(
                                    inputStream));
        } finally {
            if (inputStream != null) {
                inputStream.close();
            }
            entity.consumeContent();
        }
    }
}
    System.out.println(responseString);
And I am getting this reponse :
{"error":{"errors":[{"domain":"global","reason":"invalid","message":"Token invalid - Invalid AuthSub token.","locationType":"header","location":"Authorization"}],"code":401,"message":"Token invalid - Invalid AuthSub token."}}
Is anyone here who can help me on that.
Thanks.