Hi all,
I am trying to GET trends/place but not successful. I made some research at this discussion boards and other websites but can not still solve my problem. The biggest problem is that twitter developer page does not gives sufficient information about a topic and the suggestions does not work. Let me explain more… I read the explanation of the GET trend/places and got the idea.
Then I select an application of mine and click on “Generate OAuth Signature” button.
Then it ask me what will I do with it (GET,POST etc) I select GET and asks for a “Request Query” which is “id=23424969” which is WOEID of Turkey where I want to get the trend topics of. (Even not works with global id=1). Just to remember, I will use this at a C# project. Then I click “See OAuth signature for this request” button.
Then it gives me 3 types of results. Signature base string, Authentication header and cURL command. I prefer signature base string so I can download the response. Here is the result (tokens are marked with x, y, z)
GET&https%3A%2F%2Fapi.twitter.com%2F1.1%2Ftrends%2Fplace.json&id%3D23424969%26oauth_consumer_key%3Dxxxxx%26oauth_nonce%3Dyyyyy%26oauth_signature_method%3DHMAC-SHA1%26oauth_timestamp%3D1385468149%26oauth_token%3Dzzzz%26oauth_version%3D1.0
I tried many things, like;
- posting this string to browser (with GET and without GET at the beginning), not worked
- posting this and trying to read and download the page with C# code (which can read and download an ordinary page) (with GET and without GET at the beginning), not worked
- changing the above string to below format
GET&https://api.twitter.com/1.1/trends/place.json?id=23424969&oauth_consumer_key=xxxxx&oauth_nonce=yyyyy&oauth_signature_method=HMAC-SHA1&oauth_timestamp=1385468149&oauth_token=zzzz&oauth_version=1.0
and trying with browser (with GET and without GET at the beginning), not worked.
- making the change at the step 3 and trying with C# code (with GET and without GET at the beginning), not worked.
I am always getting this reply;
{“errors”:[{“message”:“Bad Authentication data”,“code”:215}]}
So this string is generated by Twitter API itself but getting Bad Authentication error. As far as I see it has the credentials in the string.
Can you tell me what am I doing wrong? What should I do?
Thanks in advance for the answers and guidelines.