title: How to setup RCurl headers in R for Tinder API
body: <p>This is probably a stupid question, but for some reason I can't get my head around the RCurl headers in R in order to access an API. I'm trying to authenticate with the Tinder API, and have already authenticated to Facebook (using Rfacebook), but when authenticating to Tinder, all I get is <code>Error: Forbidden</code>. Here's what I have so far (the last two lines is where I think the problem is):</p>
  
  <pre><code>library(Rfacebook)
  library(devtools)
  library(RCurl)
  
  appID&lt;-'MYAPPID'
  appSecret&lt;-'MYAPPSECRET'
  
  fb_oauth &lt;- fbOAuth(app_id=appID, app_secret=appSecret)
  me &lt;- getUsers("me",token=fb_oauth)
  fbID &lt;- me$id
  
  save(fb_oauth,file="fb_oauth")
  load("fb_oauth")
  
  my_Token &lt;- toString(fb_oauth$credentials)
  my_httpheader &lt;- c("Content-type='application/json', User-agent='User-Agent: Tinder/3.0.4'")
  
  myTest &lt;- postForm("https://api.gotinder.com/auth", facebook_id=fbID, facebook_token=my_Token, .opts=list(httpheader=my_httpheader))
  </code></pre>
  
  <p>I'm assuming my problem is the headers, and <a href="https://gist.github.com/rtt/10403467" rel="nofollow">here's what Tinder's API says about the headers</a>. But it just returns <code>Error: Forbidden</code> which isn't really helpful for troubleshooting.</p>
  
  <p>Any suggestions about what I'm doing wrong here?</p>