• 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

  • 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?

  • 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


      $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 :

      and this is my code:

      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.

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