Skip to content

Instantly share code, notes, and snippets.

Created January 10, 2018 02:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/0789651171cfb619a70ea8ff8a47f04f to your computer and use it in GitHub Desktop.
Save anonymous/0789651171cfb619a70ea8ff8a47f04f to your computer and use it in GitHub Desktop.
Facebook Login Button For Php
********************
Facebook Login Button For Php ->>>
********************
http://shurll.com/c00qt
(Copy & Paste link)
********************
Anders Colding-Jrgensen THANK YOU! I tried for hours, but kept getting an error from Facebook. Douglas Cirqueira I did not see your solution for the problem This webpage has a redirect loop So, your code did not work. Nick Thomas Anyone know why I would be getting a 500 Internal Server Error? I uploaded the demo file to my hosting account and thats the error I get when I click the Facebook login. kaizaru need help& everything displays properly except for the email. This message is only visible to developers of your application. when I click logout, I get on other side I have defined in fbconfig.php. If you have any query or suggestions about this tutorial and scripts, feel free to comment here. Rezky Balweel hai, how can i show my facebook wall post with this code?. murali i am able to login to site,but not able to acess my details.can any one help me?. Karen Hello, I was able to get other properties ,ie. Rifqi Irsyadillah Fatal error: Call to undefined function FacebookHttpClientsmbsubstr() in /home/username/publichtml/src/Facebook/HttpClients/FacebookCurlHttpClient.php on line 254. 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. 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. Shen Siddharta Excel is it means only get fuid, fusername, and email?. Any idea on how to return email please? x Karen Terrys comment below was the solution! However, I am unable to return other properties& x. Because the FB username is set in $SESSION[FULLNAME].Check the fbconfig.php on line 39 for clarification.Happy Coding. Raj Nerella Thanks for your post, its very descriptive. ckc Why I cant show the username? (Its use the full source of the Download Pack). This message is only visible to developers of your application. Scott James This saved me a whole lot of time. The app settings looks ok, the right URL is there, everywhere, checked Embedded browser OAuth Login, enabled the platform, inserted cod & secret, but still not working. any one can help me please &&&&. The following SQL creates a users table with some basic fields in the database to hold the Facebook profile information. But when I login I dont get the authorization screen. I dont understand this well, I read the official developer site, search Google and found this. Eduardo Vega Torres Nice job. Copyright 2018 CodexWorld. Rayniel Llanes Email and Name showing !!!ffbconfig.php// see if we have a sessionif ( isset( $session ) ) { // graph api request for user data $request = new FacebookRequest( $session, GET, /me?locale=enUS&fields=name,email ); $response = $request->execute(); // get response $graphObject = $response->getGraphObject(); $fbid = $graphObject->getProperty(id); // To Get Facebook ID $fbfullname = $graphObject->getProperty(name); // To Get Facebook full name $femail = $graphObject->getProperty(email); // To Get Facebook email ID /* - Session Variables */ $SESSION[FBID] = $fbid; $SESSION[FULLNAME] = $fbfullname; $SESSION[EMAIL] = $femail; /* - header location after session -*/ require functions.php; checkuser($fbid,$fbfullname,$femail); header(Location: index.php);} else { $loginUrl = $helper->getLoginUrl(array(reqperms => email)); require functions.php; header(Location: .$loginUrl);}end of fbconfig.phpSaving Data Solved &. Short registration process helps to get more subscribers for your website. try this: $loginUrl = $helper->getLoginUrl(array(scope => email, publicprofile,userfriends));. Abdul Karim Thanks work done. how to download facebook sdk library July 21, 2017 at 5:40 AM CodexWorld Said 5a02188284
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment