Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to implment facebook connect with Yii-user extension?

I am developing a web application using a yii framework and implemented yii-user extension http://www.yiiframework.com/extension/yii-user/. I want to implement Facebook & Google Login but facing hard time in implementing them. Will OAuth work for FB and Google both? Please guide me on How to implement.

like image 779
Urvish Avatar asked Oct 11 '22 17:10

Urvish


1 Answers

I have implemented it directly. The Facebook login jssdk allows you to login very rapidly. Plus while using an extension you have to worry about it being updated. Download the jssdk and include that file in the Yii. Initialise it. On click of the button on login call FB.login method. Get the callback, if logged in then all you need to do is send a request to your internal login method in UserIdentity or a custom one you might have created and you are done.

like image 130
mayankbatra Avatar answered Oct 27 '22 09:10

mayankbatra