Full Facebook SDK

@ccheever - I’ve been using Facebook login w/ expo and it was really easy to get started with, but it seems pretty tricky to get a production workflow where users don’t have to manually type in their FB login & password (e.g. use cookies or previously logged in Facebook state from native app / system).

I followed @notbrent’s guide to using WebBrowser here: Facebook Login/Auth CRNA Expo - #7 by hiromih which was very helpful and I was able to get a simple workflow working, but it leaves a few issues: 1) IIUC, the access token received will be short-lived (~2 hours) since they are from the web flow (Extending Page Tokens - Documentation - Facebook for Developers) so I’d likely to need to make a server-side call to exchange it for a long-lived token, 2) it requires a bit of a hack since Facebook doesn’t allow you to redirect to exp:// and 3) the developer needs to manage refreshing the token before the expiration.

From what I can tell, Facebook’s SDK does a lot of this work for you.

What would you recommend Expo users to do? I’m trying hard to avoid ejecting to ExpoKit, but the alternative seems like quite a bit of work.

Thanks for your time!

1 Like