Sure you can widen the conversation. Well i should have explained why the
auth_token is there, to be honest I haven''t tested if i really need it.
I
got that code when I went to
http://www.facebook.com/code_gen.php?v=1.0&api_key=YOUR_API_KEY. See the
article here:
http://shimikoif.wordpress.com/2008/04/13/how-to-create-mobile-service-as-faceb/
Also what version of facebooker are you using, make sure you have at least
0.9.9 if you want to follow the online documentation, there is a newer
version as well, i think its somewhere around 1.0.13.
On Sat, Feb 21, 2009 at 5:22 PM, Ethan Herdrick <herdrick at gmail.com>
wrote:
> Thanks for the code, Lee. Funny thing - I have no idea what an
> auth_token is. I have a live FB app running that uses infinite
> session keys and works OK even though I''ve ever set an auth token.
> What are they?
>
> You''ve been very helpful would you mind if I widened our
conversation
> to the mailing list?
> -Ethan
>
> P.S. By the way, in examining the source code I''ve found that the
> most direct way to call Users.getInfo is indeed
> Facebooker::Session.users. Or it''s supposed to be that way. It
> doesn''t work as written, but I find if I remove some code from the
> source of that method then it works, more or less.
>
> On Sat, Feb 21, 2009 at 7:56 AM, Lee Connell <lee.a.connell at
gmail.com>
> wrote:
> > if you don''t have an infinite session key, change cached to
false. make
> sure
> > to put your key and secret.
> > #!/usr/bin/env ruby
> > require ''rubygems''
> > require ''facebooker''
> > API_KEY = ''yourkey''
> > API_SECRET = ''yoursecret''
> > session = Facebooker::Session.create(API_KEY, API_SECRET)
> > cached = true
> > if cached then
> > token = "yourtoken"
> > user_id = "youruserid"
> > session_key = "yourinfinitesessionkey"
> > session.auth_token = token
> > #puts session.infinite?.to_s
> > session.secure_with!(session_key, user_id, 0)
> > else
> > token = session.auth_token
> > puts "Paste the URL into your web browser and login"
> > puts session.login_url + "&auth_token=#{token}"
> > puts "Hit return to continue..."
> > gets
> > end
> > session.user.populate(:name, :status, :pic_square, :uid)
> > puts "Session: #{session.session_key}"
> > puts "ID: #{session.user.uid}"
> > puts "Full Name: #{session.user.name}"
> > puts "Status: #{session.user.status.message}"
> > puts "Picture: #{session.user.pic_square}"
> > friends = session.user.friends!(:name, :status)
> > friends.each do |friend|
> > puts "First Name: #{friend.name}"
> > puts "Status: #{friend.status.message}"
> > end
> > session.user.set_status("Home with the family")
> >
> >
> > On Sat, Feb 21, 2009 at 12:52 AM, Ethan Herdrick <herdrick at
gmail.com>
> wrote:
> >>
> >> Thanks, Lee!
> >>
> >> But Facebooker::Session doesn''t have a populate method.
I''ve tried
> >> Facebooker::Session.users, but it breaks, claiming my session key
is
> >> invalid. Not sure what''s going on there.
> >>
> >> -Ethan
> >>
> >> On Fri, Feb 20, 2009 at 7:35 AM, Lee Connell <lee.a.connell at
gmail.com>
> >> wrote:
> >> > you get it through calling the method populate on your
facebook
> session,
> >> > passing it arguments of what fields you want, lilke :name,
:last_name,
> >> > :uid
> >> > etc... then you access it through the user object,
"session.user.name
> ,
> >> > session.user.last_name" I don''t have the code i
was working on in
> front
> >> > of
> >> > me but that should get you started.
> >> >
> >> > On Thu, Feb 19, 2009 at 3:46 AM, Ethan Herdrick <herdrick
at gmail.com>
> >> > wrote:
> >> >>
> >> >> Where is Facebooker''s wrapper of the FB API
Users.getInfo ?
> >> >>
> >> >>
(http://wiki.developers.facebook.com/index.php/Users.getInfo)
> >> >>
> >> >> Thanks!
> >> >> _______________________________________________
> >> >> Facebooker-talk mailing list
> >> >> Facebooker-talk at rubyforge.org
> >> >> http://rubyforge.org/mailman/listinfo/facebooker-talk
> >> >
> >> >
> >
> >
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://rubyforge.org/pipermail/facebooker-talk/attachments/20090221/a5dd36d1/attachment-0001.html>