I was wondering if it was possible to create a form on my website that accepts a username and password, and once submitted redirects a user to facebook and logs in automatically?
I am not specifically asking for the code do do such a thing (although that would be appreciated) rather just suggestions of where to start and whether or not it is possible.
Thanks
Facebook does not allow xAuth, a feature that would allow for something similar to what you’re describing. Instead, you have to use a standard OAuth flow that involves redirecting the user to Facebook, where they input their credentials, authorize your app, and are then directed back with a token you can use to access to make API calls on their behalf.
FB has a good guide to their auth here. A simple way to get started with this is by using the provided Javascript SDK – their simplest example, which renders a button the user can use to log in, is:
It’s necessary to first register an app, which will give you the needed app ID.