Domanda

I'm creating a twitter login api for our mobile web application. I got this 404 not found error as return message in console. this is the full url for twitter callback

https://api.twitter.com/?oauth_callback=http%3A%2F%2F127.0.0.1%3A4268%2Fmobileapp%2F&oauth_consumer_key=<keyhere>&oauth_nonce=7540630&oauth_signature_method=HMAC-SHA1&oauth_timestamp=1396766598&oauth_version=1.0&oauth_signature=9TjVwKWGyqYEGYdfl1s56k%2BCaaY%3D

is there something wrong with the return url?

thanks

È stato utile?

Soluzione

No, the problem is not in the return url.

The problems are:

  1. You're sending the URL to https://api.twitter.com/ without any further URI to indicate the service that you're requesting. Since you are passing an oauth_callback, it's likely that you wanted to access https://api.twitter.com/oauth/request_token
  2. You can't pass an oauth_callback to oauth/request_token using a GET request: you need to use a POST request instead.

Hopefully that explains for you what's wrong with this URL.

If you are having more problems accessing the Twitter oauth API, I suggest that you read this primer from Twitter on how to use this API:

Implementing Sign in with Twitter

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top