Connecting with Twitter through OAuth


#1

Hi everyone. I’m using my embedded device and try to connect to twitter but I’m facing a issue on OAuth.

Firstly, I had registered an application from twitter and created a token that allows me to have a direct access to my twitter account. Therefore I’m trying to use the get sample that showed on the following link to test it with my device:

I used the OAuth signature generator to create the signature base string and put it into my device to send this string to api.twitter.com for testing.

However, I could only received “400 bad request” feedback from the server.

Does it means that my procedure for communicating with the twitter is wrong?

Or I need to modify the HTTPS format for OAuth to communicate with twitter?

Thanks,


#2

There are a number of reasons why this might not be working. In particular, OAuth is time-dependent, so you should check that the time on your embedded device is set correctly. If your device doesn’t support TLS then the Twitter API endpoint might be rejecting the HTTPS connection.

Does the exact same request work from a different system?


#3

Thank you for your reply. :smile:

I will check the time of my device.

My embedded device do support TLS protocol. The respond from your server is after the TLS handshake has been done.

BTW, I don’t have any other system that I could test. Do you have any suggestion on this?


#4

Maybe just send the same request from your desktop machine? I use curl and twurl for testing.