title: How to GET requests for venues in foursquare with pycurl?
body: <p>I want to use the foursquare Python api to get the details of the venue. On my browser, I would click on the following url:</p>
  
  <blockquote>
    <p><a href="https://api.foursquare.com/v2/venues/1738652/?oauth_token=FKJBZCPQNFMVBDNPBMYFVXPDTMV0RWWKJGNAORPCNFERGBIG&amp;v=20131011" rel="nofollow">https://api.foursquare.com/v2/venues/1738652/?oauth_token=FKJBZCPQNFMVBDNPBMYFVXPDTMV0RWWKJGNAORPCNFERGBIG&amp;v=20131011</a></p>
  </blockquote>
  
  <p>...and get the appropriate response.</p>
  
  <p>I am using the pycurl library with this code:</p>
  
  <pre><code>c = pycurl.Curl()
  c.setopt(c.URL, 'https://api.foursquare.com/v2/venues/1738652/')
  c.setopt(c.POSTFIELDS, '?oauth_token=FKJBZCPQNFMVBDNPBMYFVXPDTMV0RWWKJGNAORPCNFERGBIG&amp;v=20131011')
  c.perform()
  </code></pre>
  
  <p>but am getting the following error:</p>
  
  <blockquote>
    <p>{"meta":{"code":405,"errorType":"other","errorDetail":"This endpoint
    only supports GET."},"response":{}}</p>
  </blockquote>
  
  <p>I then tried to request with a GET:</p>
  
  <pre><code>import pycurl
  import cStringIO
  
  buf = cStringIO.StringIO()
  
  c = pycurl.Curl()
  c.setopt(c.URL, 'https://api.foursquare.com/v2/venues/1738652/?oauth_token=FKJBZCPQNFMVBDNPBMYFVXPDTMV0RWWKJGNAORPCNFERGBIG&amp;v=20131011')
  c.setopt(c.WRITEFUNCTION, buf.write)
  c.perform()
  
  print buf.getvalue()
  buf.close()
  </code></pre>
  
  <p>...but got the same error.</p>