Hi everyone,
Rob, not sure if you’re still following this thread, but I wanted to come back on this issue with a more detailed explanation and two possible ways to address it (either of which might be fairly easy to implement).
The overall issue is having multiple Corona apps for iOS use the same Facebook app ID and URL schema. Facebook provides a mechanism to do this, but it doesn’t currently seem possible to utilize it in Corona (except, perhaps, with Enterprise). Of course, if anyone else has figured out how to do it, I’d be interested to hear!
First off, why would anyone want to have multiple apps use the same Facebook app ID and URL schema? Two reasons. The most common reason is to have a paid and free version of your app be linked to the same Facebook app. Second, it can be helpful to have development/beta versions of your app (which might use a different iOS bundle ID) to be linked to the same Facebook app for more accurate testing of the Facebook integration.
Of course, it’s unlikely most users will install a paid and free version of an app at the same time, so most real users will only have one version of the app running on their device. Still, for facebook analytics about your app, it’s better to have the versions under one Facebook app ID than separate.
To allow multiple apps to share the same Facebook app ID, Facebook has a concept called the URL Scheme suffix (http://developers.facebook.com/docs/howtos/share-appid-across-multiple-apps-ios-sdk/). Basically, when you login to facebook, you pass not only the URL Scheme but also a suffix identifying which version of your app it is.
I think there are two ways to get this to work in Corona.
First, I think the [lua]facebook.login()[/lua] API could be supplemented with an option field for the suffix. The native Objective C code supporting the API would be slightly modified to pass the suffix to Facebook, per Step 1 in the link above. (Using the existing [lua]facebook.login()[/lua] API, simply appending the suffix to the Facebook app ID doesn’t work, since Facebook doesn’t know to parse the suffix out.)
Second, Corona could update to the Facebook 3.2 SDK. According to this Facebook bug report (https://developers.facebook.com/bugs/258147420977823/), in the 3.2 SDK, it’s possible to specify the suffix using a plist key of FacebookUrlSchemeSuffix. Of course, upgrading the Facebook SDK again might entail a whole host of other work, so I could see that not being as palatable.
Thanks!
- Andrew [import]uid: 109711 topic_id: 23006 reply_id: 145780[/import]