28 Comentários on “login with facebook php sdk – a tutorial”

  1. angadn disse:

    Hello I like the tutorial except I’m testing my appln. on localhost and none of it is working.
    I would have tried your fix but I’m running the latest SDK version (3).

    Any help would be greatly appreciated!

    • cacovsky disse:

      hi, agadn,

      as I stated in the second paragraph of this post, “I’m using the facebook php-sdk 2.1.2”. I still didn’t tested the latest version, but it is something I’m planning.

  2. Dian disse:

    i have test this tutorial but nothing happens, what cause this?
    please help

  3. Good post!

    FYI: In the latest version of the SDK, they’ve removed the getSession(); method.

  4. sanu disse:

    i run this code but there is an error

    Fatal error: Uncaught exception ‘Exception’ with message ‘Facebook needs the CURL PHP extension.’ in C:\xampp\htdocs\fb\base_facebook.php:19 Stack trace: #0 C:\xampp\htdocs\fb\facebook.php(18): require_once() #1 C:\xampp\htdocs\fb\index.php(2): require(‘C:\xampp\htdocs…’) #2 {main} thrown in C:\xampp\htdocs\fb\base_facebook.php on line 19

    • cacovsky disse:

      as the error clearly says, “Facebook needs the CURL PHP extension”. enable/install the curl extension for php and re-run the sample.

  5. nirija disse:

    the second comment
    $facebook->getSession(); doesn’t return any value so it is giving me 500 internal server error

  6. […] More Detail Tutorial about login with facebook php sdk – a tutorial […]

  7. it’s a wonderful post! but i have a question, i can’t log out with the button that it’s configured, so, how can i log out just click on the link marked as “log out”??

  8. srikanth ganta disse:

    Reblogged this on Srikanth's Blog.

  9. silvio disse:

    Very nice tutorial. Thanks!

  10. mtdsousa disse:

    For those who want the SDK 2:

    Great post!

  11. reddy disse:

    How to Authenticate Users using Facebook PHP SDK 3.0 and customize facebook login image. Demo and Source Code available.


  12. Great tutorial! Tnx!

  13. iie@gmial.com disse:

    hey guys check this out
    its very easy to integrate

  14. Deena disse:

    Hi there, just became aware of your blog through Google, and found that it is truly informative.
    I am gonna watch out for brussels. I will appreciate if you continue this in
    future. Lots of people will be benefited from your writing.

  15. gagan disse:

    Hi , it’s a great tutorial but i have a doubt . I am making this website where the user will have the option to login through fb and twitte too while having the ability to login through registering through my site as well . Can you tell me how to go about it ? Like database specifics ?

  16. Jim disse:

    facebook get session is not in use now

  17. Could you please tell me the lines of code in facebook.php file which we have to replace in order to save cookie correctly for localhost. I am unable to locate 661-663.

  18. Caleb Orbit disse:


    Nice write-up although its outdated its still informative.

    Did you write a similar tutorial using the latest PHP SDK 3.2.2? There are a lot of issues out in there and it would be great if you can write up one for that.


Deixe um comentário

Preencha os seus dados abaixo ou clique em um ícone para log in:

Logo do WordPress.com

Você está comentando utilizando sua conta WordPress.com. Sair /  Alterar )

Foto do Facebook

Você está comentando utilizando sua conta Facebook. Sair /  Alterar )

Conectando a %s