We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
Page Index Toggle Pages: 1
Twitter4J (Read 7429 times)
Twitter4J
Apr 10th, 2009, 3:32am
 
Hey, I was wondering if anybody could please give me a hand with Twitter4J in Processing as I'm getting error messages with my code. I've tried posting in the Integration Forum but nobody replied.

I'm trying to retrieve my latest status message and print them to the console, but when I try to run my code I get the error

"cannot convert from List<Status> to String"

This is my code:
Code:
Twitter twitter;
String myTimeline;
User[] friends;
String username = "myUsername"; // add your own here
String password = "myPassword"; // add your own here
twitter = new Twitter(username,password);

myTimeline = twitter.getUserTimeline();

   println(myTimeline);
 }
}



Any help is greatly appreciated?

Thanks
Re: Twitter4J
Reply #1 - Apr 10th, 2009, 4:41am
 
Try this...

myTimeline = str(twitter.getUserTimeline());
Re: Twitter4J
Reply #2 - Apr 13th, 2009, 12:13pm
 
Hi,

the List is as it says a List. If you want to print out all of the elements you can use a loop, or if you just want to print out the latest update grab the first element in the list and print it. I'm not too sure what would happen if you put str(...), it could just print out the memory address of the list or print everything in the list.

Sorry I can't help anymore.
Re: Twitter4J
Reply #3 - Apr 14th, 2009, 8:12am
 
thanks Smiley ill look into it
Re: Twitter4J
Reply #4 - Oct 22nd, 2009, 7:36pm
 
can you guys help me?
i was trying to port twitter4j to android. successfully no error
and i made sample code like below.
then.
android send unknown host message" twitter.com" , i don't understand why... please somebody help me

Twitter sender = new Twitter("myid", "mypassword");
statuses = sender.getFriendsTimeline();

Re: Twitter4J
Reply #5 - Mar 9th, 2010, 10:30am
 
Does anyone know the syntax to access Geo Locations.

Im working on some code which is able to retrieve tweets no problems but i want to hone it to specific Cities or Country which im sure i can do via Geolocation and using cooridnates boundaries.

Any help appreciated please

Ashley
helloworld.me.uk
Re: Twitter4J
Reply #6 - Mar 10th, 2010, 4:33am
 
ah ok not yet supported
Page Index Toggle Pages: 1