Hi, I have a server with Linode and I run a script that auto-favorites tweets, I also have one that automatically tweets out reddit submissions to the twitter profile. I recently switched IP addresses, and the auto favoriter does not work, but the auto tweeter does.
Here’s the script I am using:
require 'twitter'
while true
begin:
config = {
consumer_key: '',
consumer_secret: '',
access_token: '',
access_token_secret: ''
}
rClient = Twitter::REST::Client.new config
sClient = Twitter::Streaming::Client.new(config)
# topics to watch
topics = ['#topichere']
sClient.filter(:track => topics.join(',')) do |tweet|
if tweet.is_a?(Twitter::Tweet)
puts tweet.text
rClient.fav tweet
end
end
rescue
puts 'error occurred, waiting for 5 seconds'
sleep 5
end
end
Anybody have any idea what could be wrong? The script is the same, so it’s not that.
root@hemingway:~/9169810# curl --verbose "https://api.twitter.com/1.1/help/test.json"
* About to connect() to api.twitter.com port 443 (#0)
* Trying 199.16.156.199...
* connected
* Connected to api.twitter.com (199.16.156.199) port 443 (#0)
* successfully set certificate verify locations:
* CAfile: none
CApath: /etc/ssl/certs
* SSLv3, TLS handshake, Client hello (1):
* SSLv3, TLS handshake, Server hello (2):
* SSLv3, TLS handshake, CERT (11):
* SSLv3, TLS handshake, Server key exchange (12):
* SSLv3, TLS handshake, Server finished (14):
* SSLv3, TLS handshake, Client key exchange (16):
* SSLv3, TLS change cipher, Client hello (1):
* SSLv3, TLS handshake, Finished (20):
* SSLv3, TLS change cipher, Client hello (1):
* SSLv3, TLS handshake, Finished (20):
* SSL connection using ECDHE-RSA-AES128-GCM-SHA256
* Server certificate:
* subject: C=US; ST=California; L=San Francisco; O=Twitter, Inc.; OU=Twitter Security;
CN=api.twitter.com
* start date: 2014-08-03 00:00:00 GMT
* expire date: 2016-12-31 23:59:59 GMT
* subjectAltName: api.twitter.com matched
* issuer: C=US; O=VeriSign, Inc.; OU=VeriSign Trust Network; OU=Terms of use at
https://www.verisign.com/rpa (c)10; CN=VeriSign Class 3 Secure Server CA - G3
* SSL certificate verify ok.
> GET /1.1/help/test.json HTTP/1.1
> User-Agent: curl/7.26.0
> Host: api.twitter.com
> Accept: */*
>
* additional stuff not fine transfer.c:1037: 0 0
* HTTP 1.1 or later with persistent connection, pipelining supported
< HTTP/1.1 400 Bad Request
< content-length: 61
< content-type: application/json;charset=utf-8
< date: Tue, 20 Jan 2015 15:16:58 UTC
< server: tsa_b
< set-cookie: guest_id=v1%3A142176701856190244; Domain=.twitter.com; Path=/; Expires=Thu, 19-Jan-2017 15:16:58 UTC
< strict-transport-security: max-age=631138519
< x-connection-hash: 395285d654cbb7f84d8e9feece1d80c7
< x-response-time: 6
<
* Connection #0 to host api.twitter.com left intact
{"errors":[{"message":"Bad Authentication data","code":215}]}* Closing connection #0
* SSLv3, TLS alert, Client hello (1):
Tracert:
root@hemingway:~/9169810# traceroute api.twitter.com -T -p 443 -n
traceroute to api.twitter.com (199.16.156.8), 30 hops max, 60 byte packets
1 212.111.33.229 0.357 ms 0.556 ms 0.660 ms
2 212.111.33.233 1.202 ms 1.093 ms 1.286 ms
3 85.90.238.169 6.341 ms 6.354 ms 6.334 ms
4 217.20.44.90 6.311 ms 6.278 ms 6.263 ms
5 80.252.81.106 6.281 ms 6.254 ms 6.209 ms
6 80.252.81.49 6.621 ms 6.476 ms 6.394 ms
7 82.199.71.62 6.300 ms * *
8 * * *
9 199.16.159.121 16.105 ms 16.033 ms 15.966 ms
10 199.16.159.127 92.160 ms 92.071 ms 91.967 ms
11 199.16.159.73 103.771 ms 103.932 ms 103.854 ms
12 199.16.156.4 109.497 ms 103.641 ms 106.542 ms
13 * * *
14 199.16.156.8 104.326 ms 105.548 ms 104.860 ms
Is my IP blacklisted? My IP is 88.80.184.238, if a twitter staff could check it for me I’d appreciate it.
EDIT 1: I tried the script on another server with a different IP (even the range was not the same), and I still get the same error.