Hey guys, I’m new to the Twitter-Development-verse. I’m working on a mood light project with Twitter & Arduino and was testing my authorization key with the sample HTTPS request Twitter had here:
POST /1/statuses/update.json?include_entities=true HTTP/1.1 Accept: */* Connection: close User-Agent: OAuth gem v0.4.4 Content-Type: application/x-www-form-urlencoded Authorization: OAuth oauth_consumer_key="xvxxxxxxxxxog", oauth_nonce="kYjzxxxxxxxx4cg", oauth_signature="tnnArxj06cWHq44gCs1OSKk%2FjLY%3D", oauth_signature_method="HMAC-SHA1", oauth_timestamp="1318622958", oauth_token="370773112-GmHxMAgYyLbNEtIKZeRNFsMKPR9EyMZeS9weJAEb", oauth_version="1.0" Content-Length: 76 Host: api.twitter.com status=Hello%20Ladies%20%2b%20Gentlemen%2c%20a%20signed%20OAuth%20request%21
I used client.println() to send these to the server, but I keep getting this in response:
HTTP/1.0 400 Bad Request content-length: 0 date: Tue, 04 Aug 2015 19:58:49 GMT server: tsa_a x-connection-
Very confused – I used my own authorization keys from the ‘Test OAuth’ option we have, instead of the sample code’s, but outside of that it’s just a sample request. Hoping to springboard off of this to my own code so I can search for terms instead of posting tweets, but first, I’m really stuck on why this isn’t working. Any help?