Skip to content

Instantly share code, notes, and snippets.

@gabrielhpugliese
gabrielhpugliese / client.js
Created December 2, 2012 14:17
meteor login with facebook
/* Imagine you want to develop a facebook canvas app.
This snippet will do all the auth dance without requiring the user to click on login.
But if the user is not logged in facebook, it will ask for the user to login.
Tip: Open the browser console to see debug messages.
Followed instructions of Facebook: https://developers.facebook.com/docs/howtos/login/getting-started/
It's is possible to improve this code with more error handling.
*/
if (Meteor.is_client) {