Basic Login

These examples show the bare minimum required to get Facebook Login operational in a couple of different ways. You'll still want to add more to your code to get it to an ideal state, so try more of our more complex examples or read our guide to using the JavaScript SDK for Facebook Login.

Using an SDK function

This example makes the link below trigger FB.login() and prompts you with the Login Dialog if you're not already logged in:

Log in with Facebook