Facebook Login With PHP SDK and Graph API

แชร์
ฝัง
  • เผยแพร่เมื่อ 15 ก.ย. 2024
  • In this video we will add a Log In With Facebook button on our login form, we will create the Facebook application and using Facebook PHP SDK we will create a callback page to get an access token from Facebook to be able to get the user's information from Facebook.
    This Facebook & Graph API & PHP Tutorials is for Beginners.
    Source Code: github.com/ruv...
    Related Video: Login With Google using PHP and MySQL:
    • Login With Google Acco...
    Microphone I Use
    ZINGYOU Desktop Microphone - amzn.to/3kJJq5b (Amazon)
    Laptop
    ASUS VivoBook 15 Thin & Light Laptop - amzn.to/2ZZRtmD (Amazon)

ความคิดเห็น • 64

  • @akhileshthapliyal6536
    @akhileshthapliyal6536 2 หลายเดือนก่อน

    Nice and detailed, thank you so much :)

  • @elricho72
    @elricho72 5 ปีที่แล้ว +2

    Excellent explanation, thanks for sharing. Very good video

  • @williamsighodalo4254
    @williamsighodalo4254 5 ปีที่แล้ว +2

    Thanks a lot for uploading, really saved me from stress.

  • @gaborpoor6432
    @gaborpoor6432 4 ปีที่แล้ว

    one of the best tutorial for facebook php login, well done mate

  • @MohkKh
    @MohkKh 4 ปีที่แล้ว +1

    Thank you so much for this great tutorial

    • @VicodeMedia
      @VicodeMedia  4 ปีที่แล้ว

      You're welcome! Watch also Login With Google using PHP and MySQL: th-cam.com/video/M4jde7THXAI/w-d-xo.html

  • @lenyjeanvillanueva4625
    @lenyjeanvillanueva4625 2 ปีที่แล้ว

    very helpful and useful. thank you so much

  • @progmandev
    @progmandev 3 ปีที่แล้ว

    Thanks i will do it tomorrow inshalah

  • @kiew661
    @kiew661 5 ปีที่แล้ว +1

    Great video, thanks for sharing

  • @balajovidiu9699
    @balajovidiu9699 4 ปีที่แล้ว +1

    Thank you very much for your work.
    It took me 3 hours to get to your video but I don't regret that time.
    Do you have other videos with Google Login in or other social medias log ins? Would really appreciate it and I think your followers will appreciate it also :)
    Thanks in advance for your reply & stay healthy!

    • @VicodeMedia
      @VicodeMedia  4 ปีที่แล้ว +1

      That would be something to consider for the next tutorials. Thank you for your feedback!

    • @VicodeMedia
      @VicodeMedia  4 ปีที่แล้ว

      New Video about how to Login With Google using PHP and MySQL: th-cam.com/video/M4jde7THXAI/w-d-xo.html

  • @ramziallia3437
    @ramziallia3437 3 ปีที่แล้ว

    the best my soon

  • @foudadev
    @foudadev 3 ปีที่แล้ว +1

    thank you very much

  • @onlineshopbali4811
    @onlineshopbali4811 3 ปีที่แล้ว

    you help me full. good man

  • @miguelramirez1926
    @miguelramirez1926 2 ปีที่แล้ว

    Excelente video, te lo agradezco

  • @ammadbinjaffer
    @ammadbinjaffer 5 ปีที่แล้ว +3

    Thank you so much for this tutorial. Could you please make tutorial how can we integrate it with WordPress.
    Thanks in advance.

    • @hosammohamed7107
      @hosammohamed7107 5 ปีที่แล้ว +1

      I am searching to get an answer for this comment the whole day i wish if I get an answer!

    • @VicodeMedia
      @VicodeMedia  3 ปีที่แล้ว

      Here you go! Login with Facebook for WordPress: th-cam.com/video/5iOtzIh0x9w/w-d-xo.html

    • @VicodeMedia
      @VicodeMedia  3 ปีที่แล้ว

      @@hosammohamed7107 Here you go! Login with Facebook for WordPress: th-cam.com/video/5iOtzIh0x9w/w-d-xo.html

  • @shwetadubey3221
    @shwetadubey3221 4 ปีที่แล้ว

    Amazing Tutorial

  • @bobmorton4633
    @bobmorton4633 ปีที่แล้ว

    Great video. How would I add this login information into my data base? My dev abandon my website and need to fix my login for my game

  • @bokunochannel84207
    @bokunochannel84207 5 ปีที่แล้ว +1

    This exactly what i need

  • @gauravchaurasiya8678
    @gauravchaurasiya8678 5 ปีที่แล้ว

    ty so match bro for wonderfull video kindly share twiter, gmail ,Instagram etc again ty "Dill jit liya bhai"

  • @RobertWildling
    @RobertWildling 5 ปีที่แล้ว

    Thank you for that explanation! I wonder, though, why you build the userData and the redirect within the "is not long-lived" section? What happens, if the token is automatically a long-lived one? Then the code would not execute, right? Would love to know, what your thoughts are! Thank you!

  • @sergiocoderius4549
    @sergiocoderius4549 5 ปีที่แล้ว +1

    Спасибо. Полезно.

  • @sammysilva3093
    @sammysilva3093 5 ปีที่แล้ว

    Muito útil, obrigado por compartilhar.

  • @neolloen6388
    @neolloen6388 3 ปีที่แล้ว

    thank you!

  • @ShalomCO
    @ShalomCO 2 ปีที่แล้ว

    Thanks for this video guide
    I need help i am pulling the posts of facebook page and its stop after about two three months with this error: "Invalid OAuth 2.0 Access Token" how to check if Access Token expired and how to get new long range access token

  • @rainwalker2420
    @rainwalker2420 4 ปีที่แล้ว

    Thanks.

  • @mohammadawais6426
    @mohammadawais6426 5 ปีที่แล้ว

    Thanks. But I've done the same code as above, and it is not giving me anything other than id and name. How come?

  • @lenyjeanvillanueva4625
    @lenyjeanvillanueva4625 2 ปีที่แล้ว

    how about adding social plugins and integrate it to another website???

  • @tribalijars
    @tribalijars 3 ปีที่แล้ว

    Greeting. I need to be able to automatically share posts from the site to facebook. What is needed here? I don't need a button and login options, I just need to connect to automatically post posts from the wordpress site to my facebook page. I have a plugin but authorization is possible for free via PHP code. What do I need?

    • @VicodeMedia
      @VicodeMedia  3 ปีที่แล้ว

      I might be wrong as I didn't look into it for a while now but I think that you need to give access to this kind of data from your Facebook app which you created on developers.google.com and then from there you just output the data using fb API. You might want to look at Facebook documentation as you might need to create a separate app designed specifically for this kind of jobs.

  • @InspirationBroadcast
    @InspirationBroadcast 3 ปีที่แล้ว +1

    Please can you do same for twitter and Instagram? Thank so much

    • @VicodeMedia
      @VicodeMedia  3 ปีที่แล้ว

      I will keep that in mind. Thank you!

  • @labanjohnson
    @labanjohnson 2 ปีที่แล้ว

    why the back slashes in the Facebook object name?

  • @juandelacruz2923
    @juandelacruz2923 5 ปีที่แล้ว +1

    hi your code is verry nice thanks for sharing :) , how about logout ? i create logout . and if i log out in website . localhost problem is my facebook is auto login ? it cant destroy session from localhost website . accesstoken session .
    hope you help me :) thanks

  • @anselmood8432
    @anselmood8432 4 ปีที่แล้ว

    Hi I have an error that shows "SDK Exception: Cross-site request forgery validation failed. Required param "state" missing from persistent data." please help thanks

    • @patrick-dev
      @patrick-dev 4 ปีที่แล้ว

      Make sure to start the session before executing any script on both files

  • @pintupatel3429
    @pintupatel3429 4 ปีที่แล้ว

    Some Error Come in my demo
    App Not Setup: This app is still in development mode, and you don't have access to it. Switch to a registered test user or ask an app admin for permissions.

    • @VicodeMedia
      @VicodeMedia  4 ปีที่แล้ว

      You didn't setup properly the Facebook app

  • @dolatkhandolat2884
    @dolatkhandolat2884 2 ปีที่แล้ว

    Cza

  • @apnafoodpk5690
    @apnafoodpk5690 3 ปีที่แล้ว

    how do i login with facebook business page?

  • @pinyin1
    @pinyin1 4 ปีที่แล้ว +1

    How can I save user info to database

    • @VicodeMedia
      @VicodeMedia  4 ปีที่แล้ว

      Please have a look at this tutorial about Login with Google where I show how to save the user in the database. You can use the same strategy for Facebook. Link: th-cam.com/video/M4jde7THXAI/w-d-xo.html

  • @amagrawal0090
    @amagrawal0090 5 ปีที่แล้ว

    My code takes me back to login.php. Could you help?

    • @zizisyahirah1546
      @zizisyahirah1546 4 ปีที่แล้ว

      me too :( do u have the solution for this? Please help

  • @sanjaychauhan7621
    @sanjaychauhan7621 3 ปีที่แล้ว

    My FB account was hake can you help me recover.

  • @RichardTMiles
    @RichardTMiles ปีที่แล้ว

    Watching you manually download a composer package hurt my sole

  • @nguyencaotai412
    @nguyencaotai412 4 ปีที่แล้ว

    am not see folder facebook on github of you ?

    • @VicodeMedia
      @VicodeMedia  4 ปีที่แล้ว +1

      Hi! That's the php-graph-sdk in the Facebook folder. I didn't include it there because in time they update it and by the time people watch this video there may be a new version. That's why you should make sure to download the latest version of php-graph-sdk.

    • @nguyencaotai412
      @nguyencaotai412 4 ปีที่แล้ว +1

      @@VicodeMedia thank you, can you have videos login token facebook auto like? Please

    • @VicodeMedia
      @VicodeMedia  4 ปีที่แล้ว

      I will keep that in mind. Thank you!

  • @owallace_tavares
    @owallace_tavares 4 ปีที่แล้ว

    how i make to logout? u can help me?

    • @VicodeMedia
      @VicodeMedia  4 ปีที่แล้ว

      Just create a file which will destroy the session and put a link to that file on your page.

    • @owallace_tavares
      @owallace_tavares 4 ปีที่แล้ว

      @@VicodeMedia ahhh, ok, thanks, easy

  • @adrianiordache4391
    @adrianiordache4391 4 ปีที่แล้ว

    This is so badly explained. Your draw doesn't represent what you've done. You just went straight to the stuff and avoided making clear explanation about why is this requiring this and that. Basically, you have no idea how Facebook API works, you just copy and paste whatever you learned from other videos.

    • @VicodeMedia
      @VicodeMedia  4 ปีที่แล้ว

      Hi, Adrian! Thank you for the feedback. Next time I will do my best to explain better.

  • @rifatislam5106
    @rifatislam5106 4 ปีที่แล้ว

    Hi I have an error that shows "SDK Exception: Cross-site request forgery validation failed. Required param "state" missing from persistent data." please help thanks

    • @LecturesVlog
      @LecturesVlog 4 ปีที่แล้ว +1

      u just didn't start the session... Start the session in config.php

    • @vanhelsing5921
      @vanhelsing5921 2 ปีที่แล้ว

      Did you find the solution? i have the same issue