Full Facebook SDK

Hi again,

Is there any way to use full feature of Facebook SDK, such as portrayed in https://github.com/facebook/react-native-fbsdk?

It seems that Expo already has Facebook login available, but some functionality such as sharing or sending friend request for games has yet to be introduced. Any thought on this?

Thanks

1 Like

Hi pchon-

You would have to detach/eject using ExpoKit to use this. This is something people have asked for and we might add into Expo directly. What features of it are you interested in using? What things are most important to you?

More info about detach/eject: https://docs.expo.io/versions/v16.0.0/guides/detach.html

Charlie

1 Like

Thank you for the fast reply. I already detached the app. However, React Native FBSDK actually needs to modify ReactApplication which Expo built on top of. Please see: https://developers.facebook.com/docs/react-native/configure-android-current

I have no idea how to add the CallbackManager without messing with source code of ExponentActivity, which I’m not comfortable with. That’s why I would really appreciate your help :slight_smile:

As for the functionality I need, I want to add Facebook game invite to the app, which isn’t available via Graph API.

@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

+1 for full access to Facebook Graph API such as user photos, friends, etc that seems to be offered with facebook-native-sdk. I’m doing Hackathon so I will probably have to eject but it would be nice to bring this in

1 Like

Hi- you can also add and vote on feature requests at https://expo.canny.io/

We had that to help us prioritize what to build.

i want to using Facebook App Events, is there any way to use it in Expo?
Please Help.

2 Likes