Facebook Multiple, apps same APP ID, url scheme issue

Hi everybody,

I’ve several apps that uses the same Facebook App.

Everything was working perfectly, until a few build ago (including the latest public release).

So when i try to share a content on facebook, the app leaves to open facebook (for SSO purpose) then comeback, but on the wrong app !

All my apps are registered to Facebook :

They have their own Bundle ID : com.mycompany.appA com.mycompany.appB etc

They have their own Suffix : appA appB etc

Every app has a build.settings file like this

 --- trimmed :) --- FacebookAppID = "12345678901234", CFBundleURLTypes = { { CFBundleURLSchemes = { "12345678901234", "12345678901234appA" } }, }, --- trimmed ---

So i tried a few test with no apps installed each time. (every time i perform a test i remove all my apps then I install 2 of them).

Test A [Not working at all, it displays an error message on facebook]

--- trimmed :) --- FacebookAppID = "12345678901234", CFBundleURLTypes = { { CFBundleURLSchemes = { "12345678901234appA" } }, }, --- trimmed ---

Test B  (reversing keys) [Not working, It comes back to the wrong app]

--- trimmed :) --- FacebookAppID = "12345678901234", CFBundleURLTypes = { { CFBundleURLSchemes = { "12345678901234appA", "12345678901234", } }, }, --- trimmed ---

Anybody with this same issue ?

Or any guess ? i’ll take everything, i’m quite desperate ! :slight_smile:

Thanks a lot

HI there,

Unfortunately, I don’t think there’s a solution right now.  See this thread: http://forums.coronalabs.com/topic/19007-multiple-apps-using-the-same-facebook-app/?hl=facebookurlschemesuffix#entry169416.  There may be a solution if Corona updates to the Facebook 3.2 SDK, but currently I believe Corona still uses 3.1.

  • Andrew

Thank you Andrew.

Em… This is decepointing…

Whats bothering me with this is that it was working before, now it’s not anymore, i hope that Corona’s team could do anything to solve this.

I’m curious to understand your setup better, though.  I think it’s reasonable to have different versions of the same app use the same Facebook AppID (like paid, free, and development versions of the same app), but not to have completely different apps use the same Facebook AppID.  Which one are you trying?  If it’s the first case, then it shouldn’t be a really big issue, because in practice most users will never have more than one version of your app installed at the same time.

  • Andrew

Actuallly, they are all different the only thing they have in common is the facebook ID.

And i use it to manage media/post sharing on facebook (basically).

This way i don’t have to create a new facebook app id, for each application.

But i think there’s an error also in corona, according to the documentation, all I have to do is this :

FacebookAppID = "12345678901234", CFBundleURLTypes = { { CFBundleURLSchemes = { "12345678901234appA" } }, },

and this doesn’t work, maybe a clue in here.

Under CFBundleURLSchemes, it needs to be “fb12345678901234appA” (note the fb in front).

Is the only reason you use a single Facebook ID for all your apps because of convenience, i.e., because you don’t want to go through the process of setting up additional apps on Facebook?  I’m not sure that’s a good idea.  Down the road, there may be all sorts of reasons why you’d have been better off having different identities on Facebook for each app, but at that point it may be too late.

  • Andrew

I’m sorry i made a mistake on my post (fb missing) but on my live apps the prefix (fb) is there.

But i think this is possible, because you have the choice to add serveral app id and several suffix, i think this is usefull for apps like somekind of game center app like.

this is my account on facebook :

562936Capturedcran20130619143140.png

For now the only solution I see is (to pray :slight_smile: and) to add some kind of feature in corona like show.webPopup(“facebook”) like the twitter one on iOS (on android i don’t have any trouble).

Yes, it’s true that you can add multiple bundle IDs and suffixes on that setup screen in facebook.  But that functionality is meant for when you have different versions of the same app (e.g., paid, free, and development versions).  It’s not meant for completely different apps.

  • Andrew

Ok I got it. i’ve got to agree.

That explain why i can add only one iTunes store ID.

HI there,

Unfortunately, I don’t think there’s a solution right now.  See this thread: http://forums.coronalabs.com/topic/19007-multiple-apps-using-the-same-facebook-app/?hl=facebookurlschemesuffix#entry169416.  There may be a solution if Corona updates to the Facebook 3.2 SDK, but currently I believe Corona still uses 3.1.

  • Andrew

Thank you Andrew.

Em… This is decepointing…

Whats bothering me with this is that it was working before, now it’s not anymore, i hope that Corona’s team could do anything to solve this.

I’m curious to understand your setup better, though.  I think it’s reasonable to have different versions of the same app use the same Facebook AppID (like paid, free, and development versions of the same app), but not to have completely different apps use the same Facebook AppID.  Which one are you trying?  If it’s the first case, then it shouldn’t be a really big issue, because in practice most users will never have more than one version of your app installed at the same time.

  • Andrew

Actuallly, they are all different the only thing they have in common is the facebook ID.

And i use it to manage media/post sharing on facebook (basically).

This way i don’t have to create a new facebook app id, for each application.

But i think there’s an error also in corona, according to the documentation, all I have to do is this :

FacebookAppID = "12345678901234", CFBundleURLTypes = { { CFBundleURLSchemes = { "12345678901234appA" } }, },

and this doesn’t work, maybe a clue in here.

Under CFBundleURLSchemes, it needs to be “fb12345678901234appA” (note the fb in front).

Is the only reason you use a single Facebook ID for all your apps because of convenience, i.e., because you don’t want to go through the process of setting up additional apps on Facebook?  I’m not sure that’s a good idea.  Down the road, there may be all sorts of reasons why you’d have been better off having different identities on Facebook for each app, but at that point it may be too late.

  • Andrew

I’m sorry i made a mistake on my post (fb missing) but on my live apps the prefix (fb) is there.

But i think this is possible, because you have the choice to add serveral app id and several suffix, i think this is usefull for apps like somekind of game center app like.

this is my account on facebook :

562936Capturedcran20130619143140.png

For now the only solution I see is (to pray :slight_smile: and) to add some kind of feature in corona like show.webPopup(“facebook”) like the twitter one on iOS (on android i don’t have any trouble).

Yes, it’s true that you can add multiple bundle IDs and suffixes on that setup screen in facebook.  But that functionality is meant for when you have different versions of the same app (e.g., paid, free, and development versions).  It’s not meant for completely different apps.

  • Andrew

Ok I got it. i’ve got to agree.

That explain why i can add only one iTunes store ID.

Hey,

I encountered I have a similar problem. Our app exists as fbXXXXXXXXXXXfree and fbXXXXXXXXXXXplus and if you install both and try to login with facebook it semi-rendomly opens one of those as a new app and the other version will keep hanging without ever getting an answer.

I read that “defaultUrlSchemeSuffix” and “setDefaultUrlSchemeSuffix” are in the facebookSDK 3.2. Now facebookSDK 3.5 is out and the release notes of daily build 1148 ( http://developer.coronalabs.com/release/2013/1148/ ) promise to have “the newest” facebook SDK. I’m on daily build 1156 and couldn’t find anything.

Plus we have Corona Enterprise and build through XCode. So I’m not even sure how exactly build.settings should or should not affect this all. In our .plist-files in the XCode-project the right values are entered for both versions. So after returning from facebook iOS will know which app is meant. But the request to facebook does only contain fbXXXXXXXXXXX -> not specified =/

Where do I have to put my suffix? build.settings or facebookController that accesses require “facebook” or somewhere else?

[edit:]

The precise url would be:

https://m.facebook.com/dialog/oauth?type=user_agent&display=touch&redirect_uri=fbXXXXXXXXXXXXXXX%3A%2F%2Fauthorize&sdk=ios&scope=publish_stream%2Cemail&client_id=XXXXXXXXXXXXXXX
This is, what we open in a browser if there is no facebook-app installed on the device. And I need redirect_uri to be fbXXXXXXXXXXXXXXXfree or …premium and don’t know where to add/set this suffix.

Hey,

I encountered I have a similar problem. Our app exists as fbXXXXXXXXXXXfree and fbXXXXXXXXXXXplus and if you install both and try to login with facebook it semi-rendomly opens one of those as a new app and the other version will keep hanging without ever getting an answer.

I read that “defaultUrlSchemeSuffix” and “setDefaultUrlSchemeSuffix” are in the facebookSDK 3.2. Now facebookSDK 3.5 is out and the release notes of daily build 1148 ( http://developer.coronalabs.com/release/2013/1148/ ) promise to have “the newest” facebook SDK. I’m on daily build 1156 and couldn’t find anything.

Plus we have Corona Enterprise and build through XCode. So I’m not even sure how exactly build.settings should or should not affect this all. In our .plist-files in the XCode-project the right values are entered for both versions. So after returning from facebook iOS will know which app is meant. But the request to facebook does only contain fbXXXXXXXXXXX -> not specified =/

Where do I have to put my suffix? build.settings or facebookController that accesses require “facebook” or somewhere else?

[edit:]

The precise url would be:

https://m.facebook.com/dialog/oauth?type=user_agent&display=touch&redirect_uri=fbXXXXXXXXXXXXXXX%3A%2F%2Fauthorize&sdk=ios&scope=publish_stream%2Cemail&client_id=XXXXXXXXXXXXXXX
This is, what we open in a browser if there is no facebook-app installed on the device. And I need redirect_uri to be fbXXXXXXXXXXXXXXXfree or …premium and don’t know where to add/set this suffix.