3

I added Facebook authentication to my Rails 3 app according to this tutorial, and it's working great.

Now I want to display the user's name and profile picture, once he/she has logged in to the app using Facebook. I tried following the solution given here: Rails: retrieving image from Facebook after Omniauth login with Devise

But then, I get the following error:

"Can't mass-assign protected attributes: name, image"

Any ideas on how I can get this to work?

Community
  • 1
  • 1
humairatasnim
  • 218
  • 1
  • 4
  • 10

1 Answers1

4

You need to set

attr_accessible :name, :image

in the appropriate model.

airlok
  • 425
  • 3
  • 14