• sachin jaiswal

    nice explanation , please post article on other social login like google and github

    • Thanks Sachin, Sure I will post new article for another social login

  • Rajesh Rathor

    Getting a fatal error,
    Facebook SDK returned an error: Access token was not returned from Graph.

    Going in else part
    if (isset($_SESSION[‘facebook_access_token’])) {
    $accessToken = $_SESSION[‘facebook_access_token’];
    } else {
    $accessToken = $helper->getAccessToken();
    }
    I print this above if and get this FATAL error,

    Fatal error: Uncaught exception ‘FacebookExceptionsFacebookSDKException’ with message ‘Access token was not returned from Graph.’ in E:xampphtdocsrkrtutorial.comfacebookloginfacebook-php-sdkAuthenticationOAuth2Client.php:230 Stack trace: #0 E:xampphtdocsrkrtutorial.comfacebookloginfacebook-php-sdkAuthenticationOAuth2Client.php(166): FacebookAuthenticationOAuth2Client->requestAnAccessToken(Array) #1 E:xampphtdocsrkrtutorial.comfacebookloginfacebook-php-sdkHelpersFacebookRedirectLoginHelper.php(255): FacebookAuthenticationOAuth2Client->getAccessTokenFromCode(‘AQDCZip2NnKFzl0…’, ‘http://rkrtutor…’) #2 E:xampphtdocsrkrtutorial.comfacebookloginfacebooklogin.php(32): FacebookHelpersFacebookRedirectLoginHelper->getAccessToken() #3 {main} thrown in E:xampphtdocsrkrtutorial.comfacebookloginfacebook-php-sdkAuthenticationOAuth2Client.php on line 230

  • adrian

    Hy, i was insert facebook login in a custom platform.. html php.. but after user is login with facebook she dosen’t have an account acces…, i need to insert user in database website ? after that she will have acces to account ?

    • In this tutorial, I have also written code to get user details like name,first_name,last_name,email,link,gender,locale,picture.

  • Rita Shelki

    hello
    , i was https://uploads.disquscdn.com/images/68775750d4c7478d66051c48db0eb199dd27483001770ee20d53955aec6ab6d5.png insert facebook login in a custom platform.. html php.. but
    after user is login with facebook she dosen’t have an account acces…, i
    need to insert user in database website ? after that she will have
    acces to account ?

    • Facebook returns user details as shown your image. You can insert those data in DB. If you want to use fb feature from this way not possible. It is only for login.

      • M. Irfan Ansari

        what we need to do for next steps?

  • Phạm Quốc Đức Trí

    Please help me, why url has code but not get

  • rakesh makwana

    help me …
    this is error
    Insecure Login Blocked: You can’t get an access token or log in to this app from an insecure page. Try re-loading the page as https://

  • Vikas Chandore

    Hello, When I used the above code, I am not getting access token and its always take to me on else part where it redirect automatically but I want to show the all details of logged in user.
    Thanks

  • Sachin mittal

    Graph returned an error: Can’t Load URL: The domain of this URL isn’t included in the app’s domains. To be able to load this URL, add all domains and subdomains of your app to the App Domains field in your app settings.

  • ashish yadav

    i am working on a website in which i want to allow user to simply chat with each other but their chat should be hidden from other users..
    like Registered users on web,
    1. you
    2.me

    you send me hii ..
    now i reply you hello..

    $sql= insert into table where sender = $_SESSION[‘user’] and receiver= $_GET[‘user’];
    now table ->
    id- 1
    sender id – 1
    receiver id – 2
    message – hii

    id- 2
    sender id – 2
    receiver id – 1
    message – hello

    now fetch data in message box,
    $sql= select from table where receiver= $_SESSION[‘user’] and sender= $_GET[‘user’];

    but this is garbage output…

    how should i fetch message then i conversation properly.. please help me , i will be very thankful to you..

    sorry for bad English….