• 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

          • Er Rajesh Dewangan

            same problem i found

  • 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
      ));

      • vml

        how to get friend list & friend’s email id of user who is login through ur script

  • 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

      • Nika Potskhveria

        where is this code?
        I can’t find :(

        • http://www.fantasticgamez.com Hammad Evo

          Hi, Nika I have an issue “This webpage has a redirect loop” can you help me regarding this. I will be thankful.

  • 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

    • http://www.mybody.ro/ Marius Herea

      Make sure to add platform before adding the url, to avoid the error

  • 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

    • Korede Lawrence Oluwafemi

      Make sure you set the site url on the app dashboard on facebook

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

    • Samir Kumar

      same on my case bro what to do?

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

    • http://www.fantasticgamez.com Hammad Evo

      madam, can you help me, I have ”

      This webpage has a redirect loop” issue coming up. thanks.

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

    • vml

      can u tell me how to get friend list from this tutorial’s demo code ??

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

    • Ozsvár István

      I have the same problem. :(

  • 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

    • http://www.fantasticgamez.com Hammad Evo

      Hi, vinay Is this problem solved, I have ”

      This webpage has a redirect loop” issue, can anybody help me?

  • hina

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

    • vml

      change

      Do you want to make this app and all its live features available to the general public? to yes….

      in status & review tab of apps

  • 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’]))

    • http://www.fantasticgamez.com Hammad Evo

      sir, can you help me, I have

      “This webpage has a redirect loop” issue.

  • meteerturk

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

    • http://www.fantasticgamez.com Hammad Evo

      sir, can you help me plz, I have

      “This webpage has a redirect loop” issue.

  • Web Alterations

    I have a problem where additional users are not getting added to the database when they login. any fix?

  • Er Rajesh Dewangan

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

    • Jewin Patel

      hey bro plz help me

      • ghostmiro

        hi Jewin, can you give me the solution plz? thx

    • http://www.fantasticgamez.com Hammad Evo

      Sir, can you help me I have

      “This webpage has a redirect loop” issue. plz help me

  • Lisa

    Not able to get username from this script

  • rinku_y

    Great job

  • Jewin Patel

    when login on fb after that the profile page will not be display what i do???? its not redirect to the index file? plz help me..

  • http://technicus.in Er Shubham

    When i as doing the same i m getting this error :

    The page isn’t redirecting properly

    Firefox has detected that the server is redirecting the request for this address in a way that will never complete.

    This problem can sometimes be caused by disabling or refusing to accept cookies.

    please help me..

    • http://www.fantasticgamez.com Hammad Evo

      I have the same Issue can anyone help me,

      “This webpage has a redirect loop”

  • Michel Mayor

    Hey – It seems like the OAuth version will be deprecated soon … Did you by any chance thought about improving the connector ? Love your work btw!

  • vml

    how to get friend list and email id from this tutorial …. any one can help me please …………..

  • Ricardo ferreira

    In my case. after Facebook login show error “A página Web em originou demasiados redirecionamentos.” THIS HAS HAPPENED TO ANYONE?

  • sabatini

    all ok, but you cant use a pop-up?

  • Sultan

    I tried above code but it displayed

    ‘The page isn’t redirecting properly

    Firefox has detected that the server is redirecting the request for this address in a way that will never complete.

    This problem can sometimes be caused by disabling or refusing to accept cookies.’ error
    i set my app domain — localhost
    and site url is –http://localhost/projectname

  • Marcel Marcel

    after login i cant see my FB email adres. The other things are ok!
    i am using your demo files.

    can you help me out?

    • Terry

      at bottom of fbconfig.php
      change
      $loginUrl = $helper->getLoginUrl();
      to
      $loginUrl = $helper->getLoginUrl(array(‘req_perms’ => ‘email’));

      • tashfene

        Thankyou Terry!

      • Karen

        It works thanks! x

      • http://www.fantasticgamez.com Hammad Evo

        Hi terry I have “This webpage has a redirect loop” issue while trying to login using facebook php sdk. plz help me.

  • Abdul Karim

    Thank’s work done..

  • Abdul Karim

    how to get country code or name

  • http://ri-cyber.blogspot.com Rifqi Irsyadillah

    Fatal error: Call to undefined function FacebookHttpClientsmb_substr() in /home/username/public_html/src/Facebook/HttpClients/FacebookCurlHttpClient.php on line 254

  • sirajuddin

    gejcode not Get value

    protected function getCode()
    {
    return isset($_GET[‘code’]) ? $_GET[‘code’] : null;
    }

  • kaizaru

    need help… everything displays properly except for the email.. the email address does not display

  • Henry

    logout not work. Any solutions?

    • Henry

      It doesent logout from website. I try to logout and redirect to indexpage. After that I hit to login button and yahuu I am back logged in with the same Facebook account.

  • Wasim Hossain

    good

  • natcha sechele

    eish m having so many errors while trying to use this files.Parse error: syntax error, unexpected T_STRING, expecting T_CONSTANT_ENCAPSED_STRING or ‘(‘ in C:wampwww1353fbconfig.php on line 6

  • Cesar Aquino

    MUCHAS GRACIAS

  • satish

    How can get email, existing code is not retuning email, please guide

    • Guest

      Yes I have the same problem too! And I couldnt fetch other properties as well. Any idea on how to return email please? x

      • Karen

        Terry’s comment below was the solution! However, I am unable to return other properties… x

  • Radovedni Par

    Can you tell me, if this code use API v1 or API v2 facebook login?

  • Bharani

    I get this error : Fatal error: Uncaught exception ‘Exception’ with message ‘The Facebook SDK v4 requires PHP version 5.4 or higher.’ in /home/u240484366/public_html/autoload.php:32 Stack trace: #0 /home/u240484366/public_html/fbconfig.php(4): require_once() #1 {main} thrown in /home/u240484366/public_html/autoload.php on line 32

    Can anyone help me pls… Thanks in advance

    • http://www.mybody.ro/ Marius Herea

      Have your hosting provider upgrade php to 5.4

  • Karen

    Hello, I was able to get other properties ,ie. locale with
    $fLocale = $graphObject->getProperty(‘locale’);

    however, I would like to ask how could I get the “name” of “location”? I have tried the following but does not work…

    $fHomeTown = $graphObject->getProperty(‘hometown’)->getProperty(‘name’);
    OR
    $fHomeTown = $graphObject->getProperty(‘hometown’)->’name';
    $fHomeTwn = $fHomeTown->getProperty(‘name’);

    It would be nice if someone could help me with it, cheers!
    x

  • Sabar Djatmiko
  • sabatini

    hello, I activated the facebook connect. But when I login I dont get the authorization screen. how do I make see?

    Thank You

    this page:
    https://developers.facebook.com/docs/facebook-login/permissions/v2.2#reference-public_profile

    you do not understand what code to write and where to put it

  • sabatini

    hello, I activated the facebook connect. But when I login I dont get the authorization screen. how do I make see?

    Thank You

    this page:
    ithttps://developers.facebook.com/docs/facebook-login/permissions/v2.2

    you do not understand what code to write and where to put

  • sabatini