开发者

Interface for databasing tweets?

开发者 https://www.devze.com 2023-03-29 02:28 出处:网络
I have just started a new project and step one is to go and collect a bunch of information. For this first step I need a script that takes a twitter username. The program will then grab the last five

I have just started a new project and step one is to go and collect a bunch of information. For this first step I need a script that takes a twitter username. The program will then grab the last five posts from the user, and place them into a database, preferably as a JSON file.

I have been looking into Twitter4J, and the Streaming API. While I feel these are both good resources that are very robust and contain a lot of functionality. I am struggling to find anything that just gives me a simple start. Ideally a step by step, get one post as text, ki开发者_JAVA技巧nd of tutorial would be ideal, and then I can dive into the docs and find the modules I need and so on.

So is there any tutorials or lightweight frameworks that one may know of? I am open to any language, and any suggestions. Thanks in advance, and for taking the time to read through this!

TL;DR. Need a lightweight framework that handles twitter, or a link a beginner Twitter API tutorial.


If your interested in a good PHP framework and want an easier way to work with the Streaming API, I would highly recommend looking at the 140 server. It's a framework to start with rather then to integrate later, and it looks like your just starting out so it may be a good choice. Using the streaming API you can open up a firehose with your queries and items will be pushed to you. This definitely looks to be the right choice for your use case.

Also, since you now have the link to the server, take a look through the rest of this site. I don't think you'll find a better resource for Twitter tutorials and resources.

If your looking for something much simpler, and want to get your feet wet from the beginning with Twitter and if you've never worked with RESTful API's, take an additional look at the following.

Here is an article about integrating RESTful services with CI. Codeigniter is a nice PHP framework to start with and has a lot of resourceful documentation, The example they use in the tutorial is actually Twitter which is nice.

http://net.tutsplus.com/tutorials/php/working-with-restful-services-in-codeigniter-2/

Here is a more general article about the Twitter RESTful API

http://www.ibm.com/developerworks/xml/library/x-twitterREST/

and finally if your going with CI, have a look at this library that will make things that much easier. Especially if your working with oAuth and such. It basically abstracts the whole twitter API (less streaming) into easy to use CI calls.

. . and if you don't want to use the streaming API, for your use case, your going to want to cache the tweets. I don't know any specifically great articles for this, but it's a pretty popular method and should be easy to search for. You do this because the API is rate limited in most cases.

0

精彩评论

暂无评论...
验证码 换一张
取 消