All client side app that interfaces with tinder API

1.7k Views Asked by At

I am trying to obtain the authorization token from the tinder endpoint but I keep running into the CORS restriction. However I am able to obtain the facebook token and user ID without any issues. I obtain the tokens with the FB.login() function and then immediately use $http.post to call the tinder api endpoint https://api.gotinder.com/auth passing it the {facebook_token : "", facebook_id:""}. But I obtain

Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'https://run.plnkr.co' is therefore not allowed access. The response had HTTP status code 404. My code flow resembles this

FB.login().then(
  $http.post('https://api.gotinder.com/auth',{
     facebook_token : FB_TOKEN,
     facebook_id : FB_ID
  }).success(function(data){

      console.log(data);
   })
)
0

There are 0 best solutions below