question about twitter

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view

question about twitter

Jack Widman
I want to search Twitter for a particular keyword, and get the name and screenname of the tweeter,

1) Can I do this with dispatch?
2) Is there a limit on the number of results I can get? Can I get all 1500? Can I get the name and screenname of all 1500?

Reply | Threaded
Open this post in threaded view

Re: question about twitter

Hi Jack. This is possible through the Search interface.

scala> import dispatch.Http
scala> import Http._
scala> import dispatch.twitter.Search
scala> import dispatch.json.Js._

scala> Http(Search("lol").rpp(100)) map Search.from_user
res5: List[String] = List(1HundredPercent, RitchieEss, IvySunny, PhreshTooDeaf, uknowhowibe, MissKat_D, k3yzworld, tommyblack, DarrylTalley, Tuba_x, TheRealArtzilla, shesz_2_BADD, BunnyPrincess, D_Showtime_Hill, shel2freaky, phattiemelt, missBrittyO, sophistAKAted6, 1op, veejaystorm757, SmoothOj, Droski_, Ashtonfosho, CianaCinnaberry, rebekah112, PinkPooding, alisonstack, AjPanghulan,...

100 is the maximum results that Twitter will return at once, and only the username is returned in those results, not the full name that the user may have entered for their account.

Twitter Search API Method: search