E
E
Evgeny Elchev2012-04-20 12:52:27
PHP
Evgeny Elchev, 2012-04-20 12:52:27

What is the best search method?

Hello, I was faced with the task of writing a php script that will track all tweets for a specific hashtag. After looking at the api description on the official website, I realized that there are three options for this - serch api, rest and Streams. Streams, as I understand it, is not suitable for PHP, since this is a real-time function. Now I'm wondering what method will provide 100% tracking of tweets on a topic?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
V
Vitaliy Petrychuk, 2012-04-20
@vermilion1

I use serch api, though for Javascript projects.
search.twitter.com/search.json?callback=?&rpp= ' + historyCount + '&q=' + hash + '&since_id=' + sinceID where
historyCount is max. the number of tweets in the response,
hash - the hash you need without #
sinceID - the ID received in the previous request (max_id_str)
Thus, you pull the history from N tweets and make a request for new ones every M seconds

V
Vitaliy Petrychuk, 2012-04-20
@vermilion1

On the account of how best to replenish the database of tweets from the server side, I will not say anything so as not to blurt out nonsense (but in my opinion this is also a good option).
The method above is used exclusively on the client and is ideal for him.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question