title: Using Ruby + OAuth to access Yelp API
body: <p>I just getting started with OAuth, and I tried to make a small client to connect to some webservices... I tried twitter and it worked like a charm, however, I also tried to access Yelp V2 API (following their Python example) but I always get back as an answers:
  HTTP 400 Bad Request</p>
  
  <p>Missing parameter: oauth_consumer_key</p>
  
  <p>Here's my code:</p>
  
  <pre><code>require 'rubygems'
  require 'oauth'
  
  CONSUMER_KEY = "MY_CONSUMER_KEY"
  SECRET = "MY_CONSUMER_SECRET"
  TOKEN = "MY_TOKEN"
  TOKEN_SECRET = "MY_TOKEN_SECRET"
  
  
  consumer = OAuth::Consumer.new( CONSUMER_KEY,SECRET, {:site =&gt; "http://api.yelp.com", :signature_method =&gt; "HMAC-SHA1", :scheme =&gt; :header})
  
  access_token = OAuth::AccessToken.new( consumer, TOKEN,TOKEN_SECRET)
  
  p access_token.get("/v2/search?location=new+york").body
  </code></pre>
  
  <p>Regardless to say, that code works with twitter API without any problem (I actually followed twitter's example code)</p>
  
  <p>Cheers and thanks in advance,
  Ze</p>