开发者

How implement Facebook-Login / facilitate site-register using Facebook

开发者 https://www.devze.com 2023-03-17 22:22 出处:网络
I want my users to be able to login or register on my Site using their Facebook-Account. Could be either like the user clicks the \"Login using Facebook\"-Button and is automatically logged in, while

I want my users to be able to login or register on my Site using their Facebook-Account. Could be either like the user clicks the "Login using Facebook"-Button and is automatically logged in, while his data is saved to the db or he clicks "Login using Facebook" and gets my register-page filled with his data from Facebook.

I already tried the Facebook-register, but I think it doesn't solve the problem for me, because I don't want to change my entire register-dialog to Facebook. I want it additionally.

I managed to generate the "Login using Facebook"-Button using the Java-API. I also managed to get user-data via FQL using the PHP-API. But then I run into huge problems with the token.

I guess I read the (poor) documentation on FB-Developers for 20 times now. The Tutorials I found where either outdated or treat开发者_开发知识库 other cases. Besides that seemingly everyone uses another way to access FB.

Does anybody know an easy way to realize that and could clearly explain which functions, APIs, ... to use? Especially I feel like I still haven't totally understood that token-thing.


If someone is stuck with the same problems... For me it helped a lot to drop the JAVA-API and only rely on PHP.

See as well this tutorial: http://thinkdiff.net/facebook/php-sdk-graph-api-base-facebook-connect-tutorial/ (It's also a bit outdated, therefore you have to delete the call to the getSession-Method.)

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号