Multiple Apps using the same Facebook app

10 replies [Last post]
Sunny
User offline. Last seen 3 years 25 weeks ago. Offline
Joined: 20 Oct 2009

Hi there !

I'd like to know if a several apps can use the same facebook app.

I tried but, it seems that url scheme can be confusing due to corona restriction :

See here : http://blog.anscamobile.com/2011/12/uploading-photos-to-facebook-in-corona/

1
2
3
4
5
                    CFBundleURLSchemes =
                    {
                        "fbXXXXXXXXXXXXXX",
                    }
                

Using the same URLscheme is impossible for 2 apps on the same device.

Is there a walkthrough to this ?

Replies

Omnigeek Media
User offline. Last seen 32 weeks 4 days ago. Offline
Joined: 18 Jan 2011

I thought that two apps could use the same URL Schema and the user would be prompted for which app to use if there was a collision.

mimetic
User offline. Last seen 5 days 10 hours ago. Offline
Joined: 12 Feb 2011

Please, let's bump this up in priority!

I generate multiple apps from one code set, i.e. ebooks. I don't want a new Facebook app for each one, just to post pictures to Facebook!

Facebook has a way to share FB apps across multiple mobile apps, called a urlSchemeSuffix.

Please, we need to know where this can be implemented, and an example of how to implement this in Corona! Urgent!

Omnigeek Media
User offline. Last seen 32 weeks 4 days ago. Offline
Joined: 18 Jan 2011
mimetic
User offline. Last seen 5 days 10 hours ago. Offline
Joined: 12 Feb 2011

Yes, there is still a piece missing. Facebook allows multiple mobile apps to share a single Facebook app. What's missing is an example of using the "URL Scheme Suffix" to allow a single FB app to service multiple mobile apps.

I have tried creating a CFBundleURLSchemes entry in the correct form, e.g.
fbxxxxxxxMyAppSuffix
but FB on the iPad did not return to my app.

So, yes, some help would be great here! I have apps for clients waiting!

See: https://developers.facebook.com/docs/mobile/ios/build/#multiples

vudumagix
User offline. Last seen 5 years 28 weeks ago. Offline
Joined: 26 Apr 2012

I have the same problem... please any help. I tried with the suffix, i come back to the correct app but the login failed!

jesse.manuel
User offline. Last seen 4 years 1 week ago. Offline
Joined: 6 Oct 2011

Yeah, this is a real problem

dkenzik
User offline. Last seen 3 years 16 weeks ago. Offline
Joined: 17 Jul 2009

+1

nml
User offline. Last seen 5 years 45 weeks ago. Offline
Joined: 18 Nov 2011

Is this working now?

aukStudios
User offline. Last seen 2 years 24 weeks ago. Offline
Joined: 7 Dec 2011

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 facebook.login() 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 facebook.login() 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

aukStudios
User offline. Last seen 2 years 24 weeks ago. Offline
Joined: 7 Dec 2011

Hmm, it turns out that I can get it to work after all, if in build.settings I include *both* my app ID without and with the suffix I want, like this:

1
2
3
4
5
6
7
8
9
10
CFBundleURLTypes =
   {
      {
         CFBundleURLSchemes =
         {
            "fbAPP_ID",
            "fbAPP_IDSUFFIX",
         }
      }
}

Cool!

- Andrew

Viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.