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 6079399
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T10:56:31+00:00 2026-05-23T10:56:31+00:00

Currently on our website we enable users to login/register with their Facebook credentials using

  • 0

Currently on our website we enable users to login/register with their Facebook credentials using graph api. We are creating a mobile app and we want to support login with Facebook as well. I know about the Facebook Android SDK and how to retrieve the access token, my question is:

  1. Once I have the facebook access token, how can I authenticate the user with our backend system.

One idea is to pass the access_token to my backend server and query for the user’s facebook id (I don’t want to pass the facebook id because someone can just spoof the request). Now using the facebook id I can then associate it with our user id and log the user in.

  1. Would this method work, or there’s another solution
  • 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-23T10:56:32+00:00Added an answer on May 23, 2026 at 10:56 am

    The approach I described above works for well. Here’s the summary:

    1. Facebook connect through the iPhone app
    2. Retrieve the fb access token on the phone
    3. Send the fb access token to your Rails server
    4. The controller that you are using will check for the fb param and query the user information

      Sample of how the controller might look like

      if params[:fb_access_token]
        @graph = Koala::Facebook::GraphAPI.new(params[:fb_access_token])
        @me = @graph.get_object("me")  
        if profile = Profile.find_by_facebook_uid(@me["id"])
          user = profile.user
          render :text => user.access_token
        else
          render :text => "unregistered", :status => 401 and return
        end
      else
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We are currently introducing facebook and twitter login functionality for our users both on
Currently our website uses links to allow the user to change their locale. The
On our website we currently implemented logic to block IE 6 users. But IE
I'm currently experimenting with prefetching pages to increase perceived performance of our website, using
i'm using JMeter command line to stress test our website api. Now, here's a
I'm currently calling the Facebook graph API from one of my actions which returns
Our website is currently experiencing high volume download traffic. It will soon exceed the
We have an SQL 2005 database backend for our website, currently about 10GB in
My company runs a video website. We currently make our content available via streaming,
For a website I'm currently working on we're redirecting our old URL's permanently to

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.