I am working on twitter login using Jquery and Plain Java Script.
I have completed most of work, I am trying to get request_token
from https://api.twitter.com/oauth/request_token URL. Request goes from my page as well but everytime it send me error of:
jquery.js:9536 OPTIONS https://api.twitter.com/oauth/request_token 400 ()send @ jquery.js:9536ajax @ jquery.js:9143clickToCalculate @ twt.html:71onclick @ twt.html:423 twt.html:1
XMLHttpRequest cannot load https://api.twitter.com/oauth/request_token. Response for preflight has invalid HTTP status code 400 twt.html:82
Object {readyState: 0, status: 0, statusText: "error"}
My request URL page is http://kurbhatt.github.io/twt.html, you can check it's page source as well from https://github.com/kurbhatt/kurbhatt.github.io/blob/master/twt.html source page.
I have put valid and enough data from twitter apps to this page.
Can anyone tell me why I am facing this issue ?
Since last 3-4 days I am working on this issue, still not get solution for the issue.
And sometimes it gave me another type of error:
XMLHttpRequest cannot load https://api.twitter.com/oauth/request_token. Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://kurbhatt.github.io' is therefore not allowed access. The response had HTTP status code 400.
request_token
. – user3145373 ツrequest_token
from client side. – Aniket Sahrawat