• Esmin Kaduschic

    I can not take my files, because your site will not generate a link for dovnload

    • krizna

      please try now .. sorry for the late reply

      • gopinath dhara

        in database records are not inserted and after login it returns back home page…..database is empty please help me out

        • yendys

          when i login i my account in facebook it will redirect into my index file and i cannot see my information in my facebook

  • John

    I cannot download the files. Where can I get the base_facebook.php and facebook.php scripts

  • Metilic

    Hey, nice script, but could you modify it to just logout from the website and not distroing whole session and logging you out from facebook too?

    • tyujnhg

      ubnhjb

  • aspgod

    Thank you very much. That’s really help me.

  • Rahul Shakya

    Awesome man, you did a great job…it reeally helped it out.

  • Rahul Shakya

    after login i want it is to be redirected to some other page, for that how will i do it

    • krizna

      in fbconfig.php ..
      $loginUrl = $facebook->getLoginUrl(array(
      ‘scope’ => ‘email’, // Permissions to request from the user
      ‘redirect_uri’ => ‘https://http://www.krizna.com/general/login-with-facebook-using-php/’ // redirect url after login
      ));

  • Isaac Fraire Heredia

    In functions.php you have this:

    $check = mysql_query(“select * from Users where Fuid=’$fbid'”);
    $check = mysql_num_rows($check);
    if (empty($check)) {

    The variable $check make redundancy and put two records duplicated into the database, I´m fixing with this

    $check = mysql_query(“select * from Users where Fuid=’$fbid'”);
    $counter = mysql_num_rows($check);
    if ($counter > 0) {

    I´am not sure using empty function because empty return true if de the variable is declared or have the value 0

    • krizna

      @isaacfraireheredia:disqus

      $check = mysql_num_rows($check);
      //if new user.. $check will be 0 since it will not find any record and below condition will be true .. it ill insert new record ( new user )
      if (empty($check)) {

      Now check yours

      $counter = mysql_num_rows($check);
      //if new user .. $check will be 0 .. and below condition will be false .. no record inserted..
      if ($counter > 0) {

      hope this helps u

  • Heinz Puda

    Nice script, but i have a problem with this. : when I log in it works. when I click logout, I get on other side I have defined in fbconfig.php. is ok.
    but. when I open a the domain in a new brwoser windows, then I’m logged in. logout not working for me.
    if I completely close the browser, and re-open broser, I am logged out .
    please help me :)

    • Heinz Puda

      OMG … error found ^^

      this is your code :
      $facebook->destroySession();

      and this is my code:
      $facebook->distroySession();

      ok now it working perfect ..

      thx for the script

  • Kishi Agrawal

    I am facing an error that is->Given URL is not allowed by the Application configuration.: One or more
    of the given URLs is not allowed by the App’s settings. It must match
    the Website URL or Canvas URL, or the domain must be a subdomain of one
    of the App’s domains.
    how can i solve this

  • Pingback: Anonymous

  • Raja

    if($user) condition false.

  • Prathyusha Punni

    but i got error is “Given URL is not allowed by the Application configuration.: One or more
    of the given URLs is not allowed by the App’s settings. It must match
    the Website URL or Canvas URL, or the domain must be a subdomain of one
    of the App’s domains.” how can i solve this?

    • LM

      have to make sure your domain name and the domain in the app settings on facebook match, inclusing the subdomain or www. part(if you have qwerty.com on one and type http://www.qwerty.com in the other , it wont work) for same reason it doesn’t work on a localhost unless there is a workaround

  • Shekhar Atole

    hey admin not worked in my project?? :(

  • Agent Of Chaos

    Bro, thanks a lot for this. Very helpful. I’d like to just point out that this code is no longer working. But just add that big ass fb_ca_chain_bundle.crt file in the src folder and it works…but it’s not recognizing the username attribute anymore among the user details.

  • Eduardo Vega Torres

    Nice job. In my case, the variable $funame is not getting the username from facebook through $fbuname = $user_profile['username']; The other vars are getting the right. Any guess?

  • Andy

    I cannot log out :(

    • LM

      probably same issue, if i click logout it logs me out of facebook, but i stay logged in the website using this script with full access to my fb data.(just using vanilla copy of script atm). any suggestions?

      • LM

        only way i seem to be able to revoke access to profile is to remove app in my facebook settings. bit problem, since if someone logs into my site on a PC, then logs out, someone else comes on PC – they immediately get access to previous account since logout doesn’t work and they can see all previous users fb details displayed, without even needing a fb login :/ googling fix now, but thus far seems noone else has/has noticed this issue :(… search continues…

        • Abhijith Sasikumar

          Same issue here. Fixed.

          Go to index.php page. Replace the logout link with the following link:

          Logout

          go to logout.php and change the header location to your desired url.

  • Ross

    The script seems awesome but it doesn’t seem to be working for me. When i press the login with facebook link It is sending me to a facebook link, but then im redirected back to the index page before i even login. Please help me! :D

  • ckc

    Why I can’t show the username? (It’s use the full source of the Download Pack)

  • Vignesh Selvam

    demo not working

  • James

    I am getting this error: You are using a display type of ‘page’ in a small browser window or popup. For a better user experience, show this dialog with our JavaScript SDK without specifying an explicit display type. The SDK will choose the best display type for each environment. Alternatively, use display type ‘popup’ if you have special requirements precluding you from using the SDK. This message is only visible to developers of your application. Has anyone else had this problem?

  • harjinder singh

    hi please help me. after login on left sidebar no friend list show it should be error Warning: Invalid argument supplied for foreach() in C:xampphtdocsfacebook_sourceindex.php on line 106 and when i click on like button it should be error. help me please. thanks in advance.

  • Omar N Shamali

    your demo is fucked up dude

  • Pingback: unable to login to my website with facebook login

  • Muhammad Nadeem

    good tutorial, but I have problem, I can log in with one account ( that is administrator / developer account) and unable with all others.

  • Acp Vinay Kumar

    Am using subdomain for facebook login while login button is pressed a white new popup opens and doing nothng wat to do

  • hina

    its work only for one id not for all.please help me to login all users.

  • murali

    i am able to login to site,but not able to acess my details.can any one help me?

  • murali

    i am able to login to site,but not able to acess my details.can any one help me?

  • Prashant Rishi

    Notice: Undefined index: FBID

    • disizmeanup

      you can write
      (isset($_SESSION['FBID']))

  • meteerturk

    in functions.php, change this:
    Fuid=’$fbid'”
    to this:
    Fuid=’$fuid'”
    Or it’s gonna insert same users during every single login;)