Hello - i am trying to get my app connected to the streaming API to track real-time use of a couple of keywords.
I downloaded and installed phirehose (https://github.com/fennb/phirehose), and to get a feel for the class, i was calling consume from a browser to see some examples of what it would be capturing. Yes i know streaming / phirehose is designed to be called from a long-running process via terminal, but i was exiting the script at certain times.
I setup the OAuth keys, got my user access tokens and it worked for quite a while. i would simply call exit() in the php script after i gathered 5 or more tweets.
This worked nicely for about an hour. then it stopped working. i looked at the logs class was outputting and noticed that i was getting 401 Unauthorized response to my connection requests. this happened out of the blue - nothing changed. i have now gone to make straight REST API calls and am still getting 401 Unauthorized responses to those calls as well.
I have since gone back to my app in the twitter dev website. i’ve tried clicking on the recreate access token button, but they never change.
Lastly, is it better to call streaming endpoints from php or a direct http like curl?
I’m stuck! Any ideas? thanks in advance