2

I'm implementing Facebook login into the Joomla login module. I took code from Facebook SDK site and I'm able to authenticate using Facebook. After authentication I am getting user data also like username and email id.

Now, the problem is it is not logging-in to my Joomla site using this information? I am using this information to create an user with random password.

If I can get any reference of any tutorial where Facebook login is implemented, that would be really helpful.

Please let me know if you want any specific piece of code.

I don't want to go for any extension because I have few other changes also, in the same module.

1 Answer 1

2

This is more of a suggestion than an answer, but you can learn a lot by looking at other extensions to see how they solved the issue. A component called Facebook Graph Connect seems to do something very similar to what you're trying to achieve (automatically logging in using a Facebook account and a random password).

Download the extension, install it on a demo site, and take a look at the source code and functions. If the extension is for your own use, you can freely copy any parts of the code.

You can also go the other way around, install an extension with similar functionality, and edit it to meet your requirements. This can often be a quicker solution than trying to invent everything from scratch. Again, unless you're going to redistribute your extension, you can use and edit any GPL-licensed code freely.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.