如何获取Facebook用户的详细信息并保存到我的网站数据库 [英] how to get facebook user details and save to my website database

查看:138
本文介绍了如何获取Facebook用户的详细信息并保存到我的网站数据库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

关于如何使用PHP将Facebook集成到我的应用程序/网站,我陷入了困境。用户可以使用我们的网站注册和登录登录我们的网站。但是如果用户想通过Facebook登录,那么该用户应该登录我们的应用程序。



如果用户登录到facebook并访问我的网站第一次然后PHP代码应该将他的所有细节保存到我们的数据库中,然后允许用户访问我们的网站。



如果用户现在从facebook登录并转到我们的应用程序然后他将登录我们的网站,因为他们的详细信息存在于数据库中,因为我们保存了他的基本详细信息,如用户名,名字,姓氏,国家,州,城市,性别等详细信息



有没有办法摆脱这个问题。

Hi All,
I am stuck at 1 point on how to integrate Facebook using PHP to my application/website. User can login to our site using our site registration and login. But if user wants to get login through facebook then that user should be logged in to our application.

If user is logged in to facebook and goes to my site for the first time then PHP code should save his all details into our database and then allow user to access our site.

If user login from facebook now and goes to our application then he will just get logged in to our site as his details were present in database as we have saved his basic details such as username,firstname,lastname,country,state,city,gender etc details

Is there any way out to get out of this problem.

推荐答案

http://www.9lessons.info/2011/09/update-login-with-facebook-and-twitter.html [ ^ ]







http://www.9lessons.info/2011/02/login-with-facebook-and-twitter.html [ ^ ]





http:// www .9lessons.info / 2011/01 / user-signup-using-facebook-data.html [ ^ ]





这些链接会帮助你
http://www.9lessons.info/2011/09/update-login-with-facebook-and-twitter.html[^]



http://www.9lessons.info/2011/02/login-with-facebook-and-twitter.html[^]


http://www.9lessons.info/2011/01/user-signup-using-facebook-data.html[^]


These links will help you


Hello Amol,



请查看面向PHP的FaceBook SDK [ ^ ]。您还需要Facebook SDK for Javascript才能支持使用Facebook帐户登录。按照 [上的说明进行操作.facebook.com / docs / facebook-login / getting-started-web /> ^ ]页面完成身份验证。



您甚至可以在没有JSSDK的情况下执行此操作,请参阅这个 [ ^ ]链接。



问候,
Hello Amol,

Please have a look at FaceBook SDK For PHP[^]. You will also need Facebook SDK for Javascript to be able to support login using Facebook Account. Follow the instructions given on this[^] page to complete the authentication.

You can even do this without JSSDK, refer to this[^] link.

Regards,


这篇关于如何获取Facebook用户的详细信息并保存到我的网站数据库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆