Breaking Change: Facebook App ID required to enable Facebook libraries in Expo SDK

Ben Roth
Exposition
Published in
2 min readNov 22, 2017

--

Update: The post below is out of date, and left here for historical reference. If you use a Facebook library and find yourself getting stuck, you can ask your question in our Discord.

When we design Expo APIs we strive to make them as easy to use as possible, so you can build apps as quickly as possible. Our Facebook Login API has historically required very little effort to integrate, and works with a single JS method call.

Recently, we discovered that our native Facebook configuration was leading to adverse behavior for standalone Expo apps which don’t use the Facebook SDK at all. As a result, we’ve made a breaking change to the Expo API. Starting today, apps which make use of our Facebook Login API or Facebook Ads API will need to provide facebookAppId and facebookDisplayName in their app.json before running exp build:ios. Apps which do not provide these keys will have all Facebook libraries completely disabled in their standalone iOS builds.

If your app uses the Facebook Login API or Facebook Ads API: Add facebookAppId and facebookDisplayName to your app.json before the next time you run exp build:ios. Docs are here. This change affects all Expo SDK versions.

If your app does not use these APIs: You don’t need to do anything.

Will my production app be affected right now? No, existing builds in the App Store or Play Store will continue working fine. This only matters next time you generate a new build with exp build.

As a reminder, projects running inside Expo Client can only use the web behavior for Facebook Login. This is unchanged from before. You can use Constants.appOwnership to determine whether your project is running as a standalone app, and adapt your login behavior accordingly.

This change resolves an issue some users were seeing where their standalone apps showed a brief drop in frame rate when they were foregrounded. It’s highly unusual for us to release a breaking change between SDK versions, but we wanted to resolve this behavior quickly. In the rare circumstance that we need to do this in the future, we’ll post on this blog.

Thanks for using Expo!

--

--