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 <span style="font-size: 78%;"><span style="font-family: Verdana;"><a href="http://www.facebook.com/code_gen.php?v=1.0&api_key=YOUR_API_KEY">http://www.facebook.com/code_gen.php?v=1.0&api_key=YOUR_API_KEY</a>. See the article here: <a href="http://shimikoif.wordpress.com/2008/04/13/how-to-create-mobile-service-as-faceb/">http://shimikoif.wordpress.com/2008/04/13/how-to-create-mobile-service-as-faceb/</a></span></span><br>
<br>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.<br><br><div class="gmail_quote">
On Sat, Feb 21, 2009 at 5:22 PM, Ethan Herdrick <span dir="ltr"><<a href="mailto:herdrick@gmail.com">herdrick@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Thanks for the code, Lee. Funny thing - I have no idea what an<br>
auth_token is. I have a live FB app running that uses infinite<br>
session keys and works OK even though I've ever set an auth token.<br>
What are they?<br>
<br>
You've been very helpful would you mind if I widened our conversation<br>
to the mailing list?<br>
-Ethan<br>
<br>
P.S. By the way, in examining the source code I've found that the<br>
most direct way to call Users.getInfo is indeed<br>
Facebooker::Session.users. Or it's supposed to be that way. It<br>
doesn't work as written, but I find if I remove some code from the<br>
source of that method then it works, more or less.<br>
<div><div></div><div class="Wj3C7c"><br>
On Sat, Feb 21, 2009 at 7:56 AM, Lee Connell <<a href="mailto:lee.a.connell@gmail.com">lee.a.connell@gmail.com</a>> wrote:<br>
> if you don't have an infinite session key, change cached to false. make sure<br>
> to put your key and secret.<br>
> #!/usr/bin/env ruby<br>
> require 'rubygems'<br>
> require 'facebooker'<br>
> API_KEY = 'yourkey'<br>
> API_SECRET = 'yoursecret'<br>
> session = Facebooker::Session.create(API_KEY, API_SECRET)<br>
> cached = true<br>
> if cached then<br>
> token = "yourtoken"<br>
> user_id = "youruserid"<br>
> session_key = "yourinfinitesessionkey"<br>
> session.auth_token = token<br>
> #puts session.infinite?.to_s<br>
> session.secure_with!(session_key, user_id, 0)<br>
> else<br>
> token = session.auth_token<br>
> puts "Paste the URL into your web browser and login"<br>
> puts session.login_url + "&auth_token=#{token}"<br>
> puts "Hit return to continue..."<br>
> gets<br>
> end<br>
> session.user.populate(:name, :status, :pic_square, :uid)<br>
> puts "Session: #{session.session_key}"<br>
> puts "ID: #{session.user.uid}"<br>
> puts "Full Name: #{<a href="http://session.user.name" target="_blank">session.user.name</a>}"<br>
> puts "Status: #{session.user.status.message}"<br>
> puts "Picture: #{session.user.pic_square}"<br>
> friends = session.user.friends!(:name, :status)<br>
> friends.each do |friend|<br>
> puts "First Name: #{<a href="http://friend.name" target="_blank">friend.name</a>}"<br>
> puts "Status: #{friend.status.message}"<br>
> end<br>
> session.user.set_status("Home with the family")<br>
><br>
><br>
> On Sat, Feb 21, 2009 at 12:52 AM, Ethan Herdrick <<a href="mailto:herdrick@gmail.com">herdrick@gmail.com</a>> wrote:<br>
>><br>
>> Thanks, Lee!<br>
>><br>
>> But Facebooker::Session doesn't have a populate method. I've tried<br>
>> Facebooker::Session.users, but it breaks, claiming my session key is<br>
>> invalid. Not sure what's going on there.<br>
>><br>
>> -Ethan<br>
>><br>
>> On Fri, Feb 20, 2009 at 7:35 AM, Lee Connell <<a href="mailto:lee.a.connell@gmail.com">lee.a.connell@gmail.com</a>><br>
>> wrote:<br>
>> > you get it through calling the method populate on your facebook session,<br>
>> > passing it arguments of what fields you want, lilke :name, :last_name,<br>
>> > :uid<br>
>> > etc... then you access it through the user object, "<a href="http://session.user.name" target="_blank">session.user.name</a>,<br>
>> > session.user.last_name" I don't have the code i was working on in front<br>
>> > of<br>
>> > me but that should get you started.<br>
>> ><br>
>> > On Thu, Feb 19, 2009 at 3:46 AM, Ethan Herdrick <<a href="mailto:herdrick@gmail.com">herdrick@gmail.com</a>><br>
>> > wrote:<br>
>> >><br>
>> >> Where is Facebooker's wrapper of the FB API Users.getInfo ?<br>
>> >><br>
>> >> (<a href="http://wiki.developers.facebook.com/index.php/Users.getInfo" target="_blank">http://wiki.developers.facebook.com/index.php/Users.getInfo</a>)<br>
>> >><br>
>> >> Thanks!<br>
>> >> _______________________________________________<br>
>> >> Facebooker-talk mailing list<br>
>> >> <a href="mailto:Facebooker-talk@rubyforge.org">Facebooker-talk@rubyforge.org</a><br>
>> >> <a href="http://rubyforge.org/mailman/listinfo/facebooker-talk" target="_blank">http://rubyforge.org/mailman/listinfo/facebooker-talk</a><br>
>> ><br>
>> ><br>
><br>
><br>
</div></div></blockquote></div><br>