Malisart Aurélien
2009-Jan-25 21:23 UTC
[Facebooker-talk] How to instanciate a Group or Event model object
Hi, What do I have to do to have a populated object of class Facebooker::Group or Facebooker::Event populated with its group/event information if I know it''s gid/eid? Is it required to use FQL? I tried things like these: Facebooker::Group.new(:gid => 42) Facebooker::Event.new(:eid => 42) since the initialize of Facebooker::Model takes a hash, but the object isn''t populated. Thanks Aur?lien
Lee Mallabone
2009-Jan-26 12:10 UTC
[Facebooker-talk] How to instanciate a Group or Event model object
Hi Aur?lien, Did you already get your site setup so facebook users can login? http://apps.facebook.com/facebooker_tutorial/outline Once you have done that, in your controller make a call to: facebook_session.user.groups() or facebook_session.user.events() and you should get all the groups/events for the logged in user: you can pass in specific IDs to just retrieve individual objects. Hope that helps, Lee. 2009/1/25 Malisart Aur?lien <aurelien.malisart.mailinglists at gmail.com>:> Hi, > > What do I have to do to have a populated object of class Facebooker::Group > or Facebooker::Event populated with its group/event information if I know > it''s gid/eid? Is it required to use FQL? > > I tried things like these: > > Facebooker::Group.new(:gid => 42) > Facebooker::Event.new(:eid => 42) > > since the initialize of Facebooker::Model takes a hash, but the object isn''t > populated. > > Thanks > > Aur?lien > _______________________________________________ > Facebooker-talk mailing list > Facebooker-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/facebooker-talk >-- Lee Mallabone. Crossbone Systems Ltd. http://www.crossbonesystems.com/ http://www.fonicmonkey.net/ http://CambridgeWebHeads.ning.com/
Malisart Aurélien
2009-Jan-26 12:50 UTC
[Facebooker-talk] How to instanciate a Group or Event model object
Thanks! On 26 Jan 2009, at 13:10, Lee Mallabone wrote:> Hi Aur?lien, > > Did you already get your site setup so facebook users can login? > http://apps.facebook.com/facebooker_tutorial/outlineYes yes I did.> Once you have done that, in your controller make a call to: > > facebook_session.user.groups() > or > facebook_session.user.events()Yes this works. But what I''m trying to do is to have the infos for a given group, even if it isn''t one of the current user groups. Maybe it is not possible? Aur?lien
Malisart Aurélien
2009-Jan-26 12:55 UTC
[Facebooker-talk] How to instanciate a Group or Event model object
Mmm I just tried. It works with groups the current user isn''t member of too. Thanks for your help.
Lee Mallabone
2009-Jan-26 12:56 UTC
[Facebooker-talk] How to instanciate a Group or Event model object
You could also try using FQL queries: http://wiki.developers.facebook.com/index.php/Group_%28FQL%29 Lee. 2009/1/26 Malisart Aur?lien <aurelien.malisart.mailinglists at gmail.com>:> Mmm I just tried. It works with groups the current user isn''t member of too. > > Thanks for your help. >-- Lee Mallabone. Crossbone Systems Ltd. http://www.crossbonesystems.com/ http://www.fonicmonkey.net/ http://CambridgeWebHeads.ning.com/