Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4268092
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T06:59:18+00:00 2026-05-21T06:59:18+00:00

I want to user facebooker2 for facebook connect functionality. So when the user login

  • 0

I want to user facebooker2 for facebook connect functionality. So when the user login with facebook credentials i want to redirect to action create_facebook_user.

So I used this helper of facebooker2:

 <%= fb_login_and_redirect("/users/create_facebook_user", :perms => 'first_name,last_name,email,user_birthday') %>

OK? How can i access to facebook public information as email, first_name, last_name, etc.

My controller is:

def create_facebook_user
  if current_facebook_user
    @user = User.find_by_fb_user_id(current_facebook_user.id.to_i)
  end
  if @user.blank?
    @facebook_user = current_facebook_user.fetch

    @user = User.create :login => @facebook_user.email, :email => @facebook_user.email, :name => @facebook_user.name, :fb_user_id => @facebook_user.id
    if @user.save
      @user.profile = Profile.create(:benefactor_id => nil, :benefactor_invites =>   Setting.find_by_identifier("benefactor_invites").value.to_i)
      redirect_to :controller => "profiles", :action => "show", :id => @user.profile.id
    else
      render "new"
    end
  elsif @user.fb_user_id.nil?
    @user.update_attribute :fb_user_id, current_facebook_user.id
    redirect_to :controller => "dashboard", :url => "index"
  else
    redirect_to :controller => "dashboard", :url => "index"
  end
end

OK, my problem is to obtain user facebook information.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-21T06:59:19+00:00Added an answer on May 21, 2026 at 6:59 am

    First of all, note that some of the extended permissions you are using do not exist: “first_name” and “last_name”. Check the Facebook page about extended permissions.

    Once logged in with Facebooker, you can access these fields like this:

    current_facebook_user.first_name
    current_facebook_user.last_name
    current_facebook_user.email
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want the following urls for my UserController: localhost/user/join localhost/user/login localhost/user/user_name (this can be
I have a site that allows a user to login using their facebook login
I want user to enter only characters in excel cell.. i used ISTEXT(value) in
I want user to provide login + password to login to my webapp. If
I want user object only when exact password along with case matches. However this
I want user to type some text in JTextField and it must match some
I don't want user to see all the exporting functions through Dependence in my
I had image for Products and i want user when click on image appear
I want to user Role based security through the authorization section in the web.config
I want the user to be able to have some data already in the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.