applicationOpen event not firing

So, Walter, how can deep linking from Facebook be achieved in Corona then? The whole idea of apprequests is that it deep links back to the app. It works fine on cold start, but no event.url is found on warm start. If what you write was true, the cold start should not have a facebook deep link url either… [import]uid: 21746 topic_id: 29587 reply_id: 124825[/import]

Actually, in my test project, it’s the opposite. There is no event.url on cold start. In the test project above, if you do a cold launch via “haakon://” in Safari, you do not get an “applicationOpen” event — same would go for fb urls. [import]uid: 26 topic_id: 29587 reply_id: 124837[/import]

Well, I can be a bit more precise with 2 use cases:

Corona App is not running (cold start)

  1. Click AppRequest in Facebook App.
  2. It opens up our Corona built app
  3. The fbXXXX url scheme is available in the launchArgs
    => Success

Corona App is suspended (warm start)

  1. Click AppRequest in Facebook App.
  2. It opens up our Corona built app
  3. There is no fbXXXX in the applicationOpen event.url - there is no applicationOpen event firing at all
    => Failure

I just asked the engineers over at Facebook if they have a limitation like you describe above, and they tell me there’s no such limitation. You are allowed to forward the deep link also on warm start. [import]uid: 21746 topic_id: 29587 reply_id: 124840[/import]

Ah, okay. Why didn’t you say it like that earlier? :slight_smile:

It’s much clearer the way you explain it now — and incidentally, this is why we ask for code because that is always more precise and eliminates ambiguity.

Let me get back to you. [import]uid: 26 topic_id: 29587 reply_id: 124843[/import]

@walter

While I didn’t provide sample code when I started this thread, the problem was described very clearly. Maybe you should read the entire thread before responding. [import]uid: 44153 topic_id: 29587 reply_id: 124875[/import]

In today’s daily build (922), we have added a fix so that when an app is launched via url, “applicationOpen” system events now open on *both* initial launch and on a resume.

[Update: In addition, all fbXXX url’s are propagated as “applicationOpen” events.]

We plan to deprecate the use of the launchArgs facility for grabbing the url on an initial (cold) launch, as we think it’s more consistent to have all url-based launches go through the “applicationOpen” system event.

This fix addresses our own internal test project, so hopefully it fixes it for you all as well! [import]uid: 26 topic_id: 29587 reply_id: 125237[/import]

@j735, in retrospect, I agree, but hindsight is 20-20. The reality is the test code the team made and that was passed around wasn’t testing the right thing. @haakon’s precise description helps us refine it properly.

However, practically speaking, we still prefer to have the code. It saves everyone time, and more importantly, we can verify we fixed the actual issue. [import]uid: 26 topic_id: 29587 reply_id: 124927[/import]

@walter

I hear you. You’re probably picking up on a bit of frustration I’ve been feeling over the fact that I started this thread over a month ago and the only response I received from a Corona staff member (Tom) before your post this week was not only dismissive in tone, but completely and utterly WRONG – I expect a staff member to at least check his employer’s documentation before chiming in on a developer discussion.

BTW, is there an ID number for this bug yet? [import]uid: 44153 topic_id: 29587 reply_id: 124944[/import]

I downloaded Build 922 last night and used it for an iOS build of the app which was the original subject of this thread. At the end of the build process, I get a Corona error indicating there’s an entitlement issue (something about an improper signature). However, I know this isn’t the case and the issue went away as soon as I reverted back to Build 894. Something was broken in the course of this fix. [import]uid: 44153 topic_id: 29587 reply_id: 125300[/import]

Have you upgraded to XCode 4.5 GM?

Starting in daily build 919, we require XCode 4.5: http://www.coronalabs.com/blog/2012/09/19/corona-ios-6-and-xcode-4-5-are-gm/ [import]uid: 26 topic_id: 29587 reply_id: 125304[/import]

@walter

Thanks for that – that seems to have fixed the problem. At first glance, everything seems to be working the way I expected in the new build :slight_smile: [import]uid: 44153 topic_id: 29587 reply_id: 125332[/import]

Hi, yes, we can confirm that it works, and we’ve also removed the launchArgs implementation and rely completely on applicationOpen for both cold and warm starts. Works like it should.

How come this is not implemented for Android? I mean, some work in regards to deep linking from Facebook must have been done already, since SSO works. It’s a shame apprequests will only actually work for the iOS-users, and not the Android users.

Thanks. [import]uid: 21746 topic_id: 29587 reply_id: 125333[/import]

In today’s daily build (922), we have added a fix so that when an app is launched via url, “applicationOpen” system events now open on *both* initial launch and on a resume.

[Update: In addition, all fbXXX url’s are propagated as “applicationOpen” events.]

We plan to deprecate the use of the launchArgs facility for grabbing the url on an initial (cold) launch, as we think it’s more consistent to have all url-based launches go through the “applicationOpen” system event.

This fix addresses our own internal test project, so hopefully it fixes it for you all as well! [import]uid: 26 topic_id: 29587 reply_id: 125237[/import]

I downloaded Build 922 last night and used it for an iOS build of the app which was the original subject of this thread. At the end of the build process, I get a Corona error indicating there’s an entitlement issue (something about an improper signature). However, I know this isn’t the case and the issue went away as soon as I reverted back to Build 894. Something was broken in the course of this fix. [import]uid: 44153 topic_id: 29587 reply_id: 125300[/import]

Have you upgraded to XCode 4.5 GM?

Starting in daily build 919, we require XCode 4.5: http://www.coronalabs.com/blog/2012/09/19/corona-ios-6-and-xcode-4-5-are-gm/ [import]uid: 26 topic_id: 29587 reply_id: 125304[/import]

@walter

Thanks for that – that seems to have fixed the problem. At first glance, everything seems to be working the way I expected in the new build :slight_smile: [import]uid: 44153 topic_id: 29587 reply_id: 125332[/import]

Hi, yes, we can confirm that it works, and we’ve also removed the launchArgs implementation and rely completely on applicationOpen for both cold and warm starts. Works like it should.

How come this is not implemented for Android? I mean, some work in regards to deep linking from Facebook must have been done already, since SSO works. It’s a shame apprequests will only actually work for the iOS-users, and not the Android users.

Thanks. [import]uid: 21746 topic_id: 29587 reply_id: 125333[/import]

Hi,
Sorry to hijack but I have a mildly off topic question regarding FB deep linking in in Corona. I can’t for the life of me get it to work (on the facebook side).

Is there some specific format the facebook post needs to be to get the deep linking activated? Does it need to be a specified base URL? My test below, using a google url, always opens up the link in facebook app embedded browser, instead of launching my app.
[lua] local path = “me/feed”
local message = “You have bee sent a Message”
local params = {message = message , link=“http://www.google.com”}
libFacebook.request( path, “POST”, params, onFbPost )[/lua]

My app is set up to use SSO and deep linking, SSO works a treat. When I click the app name in post the app will launch, but clicking the actual link just opens the web page?

Is there a special format you are meant to use? I think I am missing something really stupid here, but just can’t seem to get it right. Any advice?

Thanks

[import]uid: 169392 topic_id: 29587 reply_id: 127410[/import]

Never mind problem solved. As suspected I was being dumb, it will not deep link any old URL, as far as I can tell it will only deep link your namesapce so the code above needs to have the google link changed to something link “https://apps.facebook.com/appNameSpace/” for it to work [import]uid: 169392 topic_id: 29587 reply_id: 127537[/import]

Hi,
Sorry to hijack but I have a mildly off topic question regarding FB deep linking in in Corona. I can’t for the life of me get it to work (on the facebook side).

Is there some specific format the facebook post needs to be to get the deep linking activated? Does it need to be a specified base URL? My test below, using a google url, always opens up the link in facebook app embedded browser, instead of launching my app.
[lua] local path = “me/feed”
local message = “You have bee sent a Message”
local params = {message = message , link=“http://www.google.com”}
libFacebook.request( path, “POST”, params, onFbPost )[/lua]

My app is set up to use SSO and deep linking, SSO works a treat. When I click the app name in post the app will launch, but clicking the actual link just opens the web page?

Is there a special format you are meant to use? I think I am missing something really stupid here, but just can’t seem to get it right. Any advice?

Thanks

[import]uid: 169392 topic_id: 29587 reply_id: 127410[/import]