Streaming POST/filter API help on php


#1

I’m new to twitter app development and despite having read the documentations I’d just like to clarify some things.

I’m hoping to create an app that will track hashtags. Each User of the app will be able to specify the hashtag they wish to track.

I aim to make this all web based where a user will login to their personal client page and be able to alter the hashtag they wish to track.

  1. In order not to set up a stream per person is it possible to track multiple hashtag searches and then sift through the returned results later to direct them to the respective user?
    If not how best would it be to go about setting up individual streams and is this even allowed. These streams would be on all day but would only look for one hashtag through out that whole period.

  2. Is there a good example of connecting to the filter.json streaming api with php?

  3. The results that come back how accurate are they or do they not return all results?

I think that’s all I need to ask for now…

I’d appreciate any help - Thank you in advance!


#2

I’ve found that [node:14935, title=“this thread”] helps clear up a lot of people’s misconceptions about the Streaming API.

You can use PHP easily to connect – tmhOAuth has some examples.

But you should think of your connection to the Streaming API as a separate “application” than the web application being served to end-users. Streaming connections are meant to be open for a long period of time and you are limited to a very small handful (ideally one). If you expect users to frequently providing you new terms to track in real time, it’s not going to be a best fit for you. You may rather use the Search API instead in that case, and require your end-users to OAuth in to your app first.