title: How to use fbgraph in ruby on rails
body: <p>Two questions:</p>
  
  <ul>
  <li>How do I get a list of groups a user is in?</li>
  <li>How do I post on a user's wall?</li>
  </ul>
  
  <p>Here's what I have so far:</p>
  
  <pre><code>include DeviseOauth2Facebook::FacebookConsumerHelper
  
  client = facebook_client
  
  client.access_token = User.first.facebook_token
  
  fb_user = client.selection.me.info!
  </code></pre>
  
  <p>That seems to work fine, these work as expected:</p>
  
  <pre><code>&gt;&gt; fb_user.firstname
  =&gt; "Bobby"
  &gt;&gt; fb_user.email
  =&gt; "bobby.tables@example.com"
  </code></pre>
  
  <p>But from here I'm not really sure what to do.</p>
  
  <p>Also, the example at the fbgraph github page fails:</p>
  
  <pre><code>&gt;&gt; client.search.query('q').on('users').limit(20).info
  NoMethodError: undefined method `info' for #&lt;FBGraph::Search:0x2b91bd1554f8&gt;
  </code></pre>
  
  <p>/home/heroku_rack/lib/console.rb:150
   /home/heroku_rack/lib/console.rb:150:in <code>call'
   /home/heroku_rack/lib/console.rb:28:in</code>call'
   /usr/ruby1.8.7/lib/ruby/1.8/monitor.rb:242:in `synchronize'</p>
  
  <p>If you can help me identify the user's groups and post on their wall, or point me toward further instruction, that would be appreciated.</p>