Unable to get OAuth2 Bearer token in Angular JS(ionic)


#1

Hi I am trying to login my app using twitter for which i am using Oauth2 .I am getting response (token) when using postman tool.But same thing when i am doing in code(on local host as well as on server) or RestClient tool i am getting bellow error.–>

XMLHttpRequest cannot load https://api.twitter.com/oauth2/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://127.0.0.1:8100’ is therefore not allowed access. The response had HTTP status code 400.

I have tried lots of solutions for this ,But nothing is working.Please let me know if iam missing something.It will be helpful.

Thanks