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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T15:39:35+00:00 2026-06-09T15:39:35+00:00

I have a website with a standard PHP login system, nothing special, but would

  • 0

I have a website with a standard PHP login system, nothing special, but would like to allow people to use Facebook to login and/or register to it, but with no success.

There are so many options, I don’t know which one to use. I’m fairly sure I could get the right one working, but I literally don’t know where to start.

I’ve successfully registered an app and got an app key and secret key. I then tried the facebook login button as here: https://developers.facebook.com/docs/guides/web/#login – but that didn’t appear ideal as I wasn’t certain how to store the data.

Then I checked the Graph API and I think that’s what I need. I’ve got the code able to give me an access_token which I can then store in a mySQL database. I can then access https://graph.facebook.com/me?access_token=HOOP_DE_DOOT_DE_FRUIT and get a big JSON list of stuff, which is obviously relative to the permissions I’ve asked for.

Is the access_token method the correct method? Of course, once I have it, I can just bung the token in the DB, store it along with the email address and then access the user’s information but I’m not sure if that’s secure for logins, though it’ll speed up registration because I can pre-fill all the fields.

How should I be using the access_token to actually login a user, assuming that I can successfully get it and store it in a mySQL database with the corresponding email address?

  • 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-06-09T15:39:36+00:00Added an answer on June 9, 2026 at 3:39 pm

    If you’re trying to log in a user using your database you want to get their user id, which you can do with PHP like this:

    require_once(BASE_PATH . "facebook.php");
    $facebook = new Facebook( array('appId'=>'appId', 
                            'secret'=>'secret', 
                            'cookie'=>false) );
    $fbid = $facebook->getUser();
    

    Or you can log them in on the front end like this:

    FB.login(function(response){
            //Log them in
                if(response.authResponse){
                //They're now logged in
                    var uid = response.authResponse.userID;
                }
    }
    

    And then use an ajax call or something to pass the id back to the back end.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have website where users can login with their Facebook account. I am using
I currently have a website with a standard web interface on index.php , and
I'm fairly new to PHP and have built a medium sized website using standard
i have a wordpress based website. I have a standard wordpress loop that executes
I have implemented few payment websites using PayPal Standard, PayPal Website Pro, PayPal Express
I have website, usually all looks fine but sometimes one div is on the
I am working on a simple SESSION/COOKIE login system for a website on a
I have a website which has some non standard characters such as ë ,
Question I have a fairly static website with just a few basic PHP usage.
I have a PHP based website, with database connections, form processing, etc, that I

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.