rails accessing value from facebooker hash/array
- by Ben
This is my first time using the facebooker plugin with rails, and I'm having trouble accessing user info. The website uses FB connect to authenticate users.
I am trying to get the name of the university that the logged in user attends.
When I use the command <%= facebook_session.user.education_history[:name] %>, I get an error "Symbol as array index".
I have also tried using education_history[1], but that just returns
"# Facebooker::EducationInfo:<some sort of alphanumeric hash value>"
When I use something like <%= facebook_session.user.relationship_status %> , it returns the relationship status just fine.
Similarly,
<%= facebook_session.user.hometown_location.city %> returns the city name just fine.
I've checked out the documentation for facebooker, but I can't figure out the correct way to get the values I need.
Any idea on how to get this to work?
Thanks!