开发者

How to use fbgraph in ruby on rails

Two questions:

Here's what I have so far:

include DeviseOauth2Facebook::FacebookConsumerHelper

client = facebook_client

client.access_token = User.first.facebook_token

fb_user = client.selection.me.info!

That seems to work fine, these work as expected:

>> fb_user.firstname
=> "Bobby"
>> fb_user.email
=> "bobby.tables@example.com"

But from here I'm not really sure what to do.

Also, the example at the fbgraph github page fails:

>> client.search.query('q').on('users').limit(20).info
NoMethodError: undefined method `info' for #<FBGraph::Search:0x2b91bd1554f8>

/home/heroku_rack/lib/console.rb:150 /home/heroku_rack/lib/console.rb:150:in call' /home/heroku_rack/lib/console.rb:28:incall' /usr/ruby1.8.7/lib/ruby/1.8/monitor.rb:242:in `synchronize'

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.


try using info!you are missing a "!"

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜