Call Montréal, Canada 524-949-6869

Blog

Thursday, September 9, 2010

How to display Facebook Profile information when using FBGraph Ruby Gem for an Authorized User

When using the FBGraph Gem for Facebook I wanted to display profile information for the logged in user authorized with Oauth2. It wasn't immediately clear to me from the documentation on how to do that.

Once you have a authorized user and a client instance, call:


You can then access various attributes:


Also note there is a fgraph gem as well, don't get them mixed up!

Developing Ruby on Rails applications and custom Content Management Systems in Montréal. Contact Firsthand.