AccessToken actoken=new AccessToken(CONSUMER_KEY, CONSUMER_SECRET);
         Twitter twitter=new TwitterFactory().getInstance();

 
twitter.setOAuthConsumer(ConstantsDemo.CONSUMER_KEY,ConstantsDemo.CONSUMER_SECRET);
             twitter.setOAuthAccessToken(actoken);
             try {
twitter.updateStatus(msg);
} catch (TwitterException e) {
// TODO Auto-generated catch block
e.printStackTrace();
This is what i did too,r u sending ConsumerKey and Consumer_Secret
Properly????

On Fri, Jun 24, 2011 at 5:29 PM, Albert <[email protected]> wrote:

> This is what im doing to update a tweet.
>
>                Twitter twitter = new TwitterFactory().getInstance();
>
>                twitter.setOAuthConsumer(CONSUMER_KEY, CONSUMER_SECRET);
>
>                twitter.setOAuthAccessToken(accessToken);
>
>                twitter.updateStatus("Send from my app!");
>
> Everything seems fine apart from the AccessToken...
>
>
> On Jun 24, 12:54 pm, ram dharan <[email protected]> wrote:
> > On Fri, Jun 24, 2011 at 5:16 PM, Albert <[email protected]>
> wrote:
> > > Hi all,
> >
> > > I am using twitter4j library to integrate my app with Twitter. I am
> > > past the authorization request, callback and I have the token and
> > > tokenSecret back from the authentication.
> >
> > > What's the problem? I am getting a
> > > "java.lang.IllegalArgumentException: Invalid access token format"
> > > error when I try to use these
> >
> > > AccessToken accessToken = new AccessToken(token, tokenSecret); //
> > > throws exception
> >
> > > Anyone else seen this?
> >
> > > --
> > > You received this message because you are subscribed to the Google
> > > Groups "Android Developers" 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/android-developers?hl=en
> >
> > what do u want to do in the next step?
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" 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/android-developers?hl=en

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" 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/android-developers?hl=en

Reply via email to