title: How to authenticate Tinder API using FB Access token and user id
body: <p>I have been trying to do Tinder authentication using FB access token and user id. I have successfully integrated FB SDK and got the details. And I followed the API documentation given in <a href="https://github.com/fbessez/Tinder/blob/master/README.md" rel="nofollow noreferrer">link</a>.</p>
  
  <p>But when I call Tinder auth API, I am getting 'unauthorized 401' error. Don't know what I am missing here, please find below the code which I used.</p>
  
  <pre><code>   AFHTTPSessionManager *manager = [[AFHTTPSessionManager alloc]initWithSessionConfiguration:[NSURLSessionConfiguration defaultSessionConfiguration]];
      manager.requestSerializer = [AFJSONRequestSerializer serializer];
      [manager.requestSerializer setValue:@"application/json" forHTTPHeaderField:@"Content-Type"];
      [manager.requestSerializer setValue:accessToken forHTTPHeaderField:@"X-Auth-Token"];
      [manager.requestSerializer setValue:@"Tinder/4.7.1 (iPhone; iOS 9.2; Scale/2.00)" forHTTPHeaderField:@"User-agent"];
  
      NSString *userId = [[NSUserDefaults standardUserDefaults] valueForKey:FB_LOGGED_IN_USERID_KEY];
      NSDictionary *parameterDic = @{@"facebook_token": accessToken, @"facebook_id": userId};
  
      [manager POST:TINDER_AUTH_URL parameters:parameterDic progress:nil success:^(NSURLSessionDataTask * _Nonnull task, id  _Nullable responseObject) {
          NSLog(@"success! %@", responseObject);    
      } failure:^(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error) {
          NSLog(@"error: %@", error);
      }];
  </code></pre>