I had the streaming API working perfectly with the old version, using the Twitter account username and password but with the impending Twitter switch over thought it best to switch over to using v1.1 and OAuth.
I downloaded the newest version of the 140dev frameworks and started from scratch. I have created my application with Twitter and have all the keys in the framework. The paths point to the same place as before when I had it working. And now when I try to run the background processes, not using nohup.
I get the following error when it fires:
Phirehose: Connecting to twitter stream: https://stream.twitter.com/1.1/statuses/filter.json with params: array ( 'delimited' => 'length', 'track' => 'divisi',)
Phirehose: Resolved host stream.twitter.com to 199.16.156.20, 199.16.156.110
Phirehose: Connecting to ssl://199.16.156.20, port=443, connectTimeout=5
Phirehose: Connection established to 199.16.156.20
Phirehose: POST /1.1/statuses/filter.json HTTP/1.0
Phirehose: Host: stream.twitter.com:443
Phirehose: Content-type: application/x-www-form-urlencoded
Phirehose: Content-length: 29
Phirehose: Accept: */*
Phirehose: Authorization: OAuth realm="",oauth_consumer_key="RETRACTED",oauth_nonce="RETRACTED",oauth_signature_method="HMAC-SHA1",oauth_timestamp="1366302331",oauth_version="1.0",oauth_token="RETRACTED",oauth_signature="RETRACTED"
Phirehose: User-Agent: Phirehose/0.2.gitmaster +https://github.com/fennb/phirehose
Phirehose:
Phirehose: delimited=length&track=divisi
Phirehose:
Phirehose: HTTP failure 1 of 20 connecting to stream: HTTP ERROR 401: Unauthorized (<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"/><title>Error 401 Unauthorized</title></head><body><h2>HTTP ERROR: 401</h2><p>Problem accessing '/1.1/statuses/filter.json'. Reason:<pre> Unauthorized</pre>). Sleeping for 10 seconds.
I am guessing this has something to do with the OAuth keys?
--
You received this message because you are subscribed to the Google Groups "140dev Twitter Framework" group.
To unsubscribe from this group and stop receiving emails from it, send an email to 140dev-twitter-fra...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
To unsubscribe from this group and stop receiving emails from it, send an email to 140dev-twitter-framework+unsub...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
To unsubscribe from this group and stop receiving emails from it, send an email to 140dev-twitter-framework+unsub...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
1. Are you absolutely sure that no other get_tweets.php script is running for this account on any server? Even a copy that is still using the old basic auth code. Please run 'ps aux' on your servers to make sure.
2. Make sure you have copied all 4 of the OAuth tokens correctly.
3. Make sure that your server clock is within 5 minutes of the Twitter server. You can use the api console with any API call to see the Twitter server time. http://140dev.com/twitter-api-console/
--To unsubscribe from this topic, visit https://groups.google.com/d/topic/140dev-twitter-framework/SKEeMAhFiFc/unsubscribe.
You received this message because you are subscribed to a topic in the Google Groups "140dev Twitter Framework" group.
To unsubscribe from this group and all its topics, send an email to 140dev-twitter-fra...@googlegroups.com.
$config['twitter']['consumerKey'] = "*******************";
$config['twitter']['consumerSecret'] = "*******************";
$config['twitter']['oauth_token'] = "*******************";
$config['twitter']['oauth_token_secret'] = "*******************";
$stream = new TwitterStreamOauth($config['twitter']['consumerKey'], $config['twitter']['consumerSecret'], $config['twitter']['oauth_token'], $config['twitter']['oauth_token_secret']);
$params = array();
$params['track'] = array('morning', 'goodnight', 'hello', 'the', 'and'); //keywords
$params['follow'] = '';//user ids
$stream->setParams($params);
$stream->start();
REQ DATA: follow=&language=en&track=morning%2Cgoodnight%2Chello%2Cthe%2Cand
Array
(
[track] => morning,goodnight,hello,the,and
[follow] =>
[language] => en
[oauth_consumer_key] => *******************
[oauth_nonce] => *******************
[oauth_signature_method] => HMAC-SHA1
[oauth_timestamp] => 1374248699
[oauth_token] => *******************
[oauth_version] => 1.0
)
follow=&language=en&oauth_consumer_key=*******************&oauth_nonce=*******************&oauth_signature_method=HMAC-SHA1&oauth_timestamp=1374248699&oauth_token=*******************&oauth_version=1.0&track=morning%2Cgoodnight%2Chello%2Cthe%2Cand
BASE STRING:
POST&https%3A%2F%2Fstream.twitter.com%2F1.1%2Fstatuses%2Ffilter.json&follow%3D%26language%3Den%26oauth_consumer_key%*******************%26oauth_nonce%*******************%26oauth_signature_method%3DHMAC-SHA1%26oauth_timestamp%3D1374248699%26oauth_token%3D*******************%26oauth_version%3D1.0%26track%3Dmorning%252Cgoodnight%252Chello%252Cthe%252Cand
REQUEST :
POST /1.1/statuses/filter.json HTTP/1.1
Host: stream.twitter.com
Authorization: OAuth oauth_consumer_key="*******************", oauth_nonce="*******************", oauth_signature="*******************", oauth_signature_method="HMAC-SHA1", oauth_timestamp="1374248699", oauth_token="*******************", oauth_version="1.0"
Content-Length: 65
Content-Type: application/x-www-form-urlencoded
follow=&language=en&track=morning%2Cgoodnight%2Chello%2Cthe%2Cand
ERROR: HTTP/1.1 503 Service Unavailable
To unsubscribe from this group and all its topics, send an email to 140dev-twitter-framework+unsub...@googlegroups.com.
To unsubscribe from this group and all its topics, send an email to 140dev-twitter-fra...@googlegroups.com.
To unsubscribe from this group and all its topics, send an email to 140dev-twitter-framework+unsubscr...@googlegroups.com.
To unsubscribe from this group and all its topics, send an email to 140dev-twitter-fra...@googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "140dev Twitter Framework" group.
To unsubscribe from this group and stop receiving emails from it, send an email to 140dev-twitter-fra...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.