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]
Everyone,
We’ve added support for launch arguments and system event “applicationOpen” to Android as of daily build #942. This allows you to support facebook deep linking on Android.
Just be sure to set up the following settings on your facebook developer page as follows:
- package name: The package name that you’ve entered into Corona’s build window.
- class name: com.ansca.corona.CoronaActivity
Facebook on Android will launch your app via an Android “Intent” using the package name and class name that you’ve entered on the developer page. The package name is your app’s unique string ID and tells the Android system which app to launch the activity from. This way there won’t be a conflict if more than one Corona app is installed on the same device. [import]uid: 32256 topic_id: 29587 reply_id: 130044[/import]
Everyone,
We’ve added support for launch arguments and system event “applicationOpen” to Android as of daily build #942. This allows you to support facebook deep linking on Android.
Just be sure to set up the following settings on your facebook developer page as follows:
- package name: The package name that you’ve entered into Corona’s build window.
- class name: com.ansca.corona.CoronaActivity
Facebook on Android will launch your app via an Android “Intent” using the package name and class name that you’ve entered on the developer page. The package name is your app’s unique string ID and tells the Android system which app to launch the activity from. This way there won’t be a conflict if more than one Corona app is installed on the same device. [import]uid: 32256 topic_id: 29587 reply_id: 130044[/import]
Hi,
this is not working on Android as of build 984.
Walter wrote: 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.
- The applicationOpen event does NOT fire on Android on cold start, only on warm start. However, that’s not such a big deal, since it is just a matter of using the launchArgs instead. But, check out the next bug:
Joshua wrote: We’ve added support for launch arguments and system event “applicationOpen” to Android as of daily build #942. This allows you to support facebook deep linking on Android.
- The event.url and launchArgs.url does not contain the correct URL from Facebook. When clicking an invite request in my Android Facebook app, I’m correctly redirected to our game, but the url param contains a link to the Facebook app center: http://www.facebook.com/appcenter/mindfeud?fb_source=notification. It should have contained the request_id from the facebook invite request the user tapped on.
EDIT:
I tested on iOS as well, and #1 is not happening there either. But even worse is the fact that you have broken #2 as well on iOS, it’s no longer getting the request_id from facebook.
I suspect that this is a consequence of you not having updated to the latest Facebook SDK… Hurray!
[import]uid: 21746 topic_id: 29587 reply_id: 135101[/import]
Haakon,
Regarding #1, we’ll have a look at the “applicationOpen” event this coming Monday. We’ve implemented it on Android to match the iOS behavior, but if the iOS behavior that we’ve implemented in build #922 was lost, then we’ll need to re-look into it. Although a quick test by Walter today demonstrated that applicationOpen was working from a cold start. In any case, we’ll look into it this Monday and make both platforms do the right thing.
Regarding #2 about the received facebook URL, that’s not a bug. The URL you are receiving is exactly how the facebook app is giving it to you via its Android intent. The facebook SDK that we are using is *not* a factor because the intent is sent from the facebook app and receiving by our Corona activity… meaning that the facebook SDK that we use never touches it. Just so you know, all of the useful information is within the Intent’s “extras” bundle, which we provide via the “androidIntent” property in the launch arguments and applicationOpen. Within that intent’s extras, you will find properties such as “app_id”, “access_token”, “expires_in”, and “extra_launch_uri”.
If you want to find out everything that is within your Android intent, trying the below code at the bottom of your main.lua file…
[lua]local function printTable(table, stringPrefix)
if not stringPrefix then
stringPrefix = "### "
end
if type(table) == “table” then
for key, value in pairs(table) do
if type(value) == “table” then
print(stringPrefix … tostring(key))
print(stringPrefix … “{”)
printTable(value, stringPrefix … " ")
print(stringPrefix … “}”)
else
print(stringPrefix … tostring(key) … ": " … tostring(value))
end
end
end
end
local launchArgs = …
print("### — Launch Arguments —")
printTable(launchArgs)
local function onSystemEvent(event)
print("*** system event type = " … event.type)
if (event.type == “applicationOpen”) then
print("### — Application Open —")
printTable(event)
end
end
Runtime:addEventListener(“system”, onSystemEvent)[/lua]
[import]uid: 32256 topic_id: 29587 reply_id: 135203[/import]
Hi,
this is not working on Android as of build 984.
Walter wrote: 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.
- The applicationOpen event does NOT fire on Android on cold start, only on warm start. However, that’s not such a big deal, since it is just a matter of using the launchArgs instead. But, check out the next bug:
Joshua wrote: We’ve added support for launch arguments and system event “applicationOpen” to Android as of daily build #942. This allows you to support facebook deep linking on Android.
- The event.url and launchArgs.url does not contain the correct URL from Facebook. When clicking an invite request in my Android Facebook app, I’m correctly redirected to our game, but the url param contains a link to the Facebook app center: http://www.facebook.com/appcenter/mindfeud?fb_source=notification. It should have contained the request_id from the facebook invite request the user tapped on.
EDIT:
I tested on iOS as well, and #1 is not happening there either. But even worse is the fact that you have broken #2 as well on iOS, it’s no longer getting the request_id from facebook.
I suspect that this is a consequence of you not having updated to the latest Facebook SDK… Hurray!
[import]uid: 21746 topic_id: 29587 reply_id: 135101[/import]
Haakon,
Regarding #1, we’ll have a look at the “applicationOpen” event this coming Monday. We’ve implemented it on Android to match the iOS behavior, but if the iOS behavior that we’ve implemented in build #922 was lost, then we’ll need to re-look into it. Although a quick test by Walter today demonstrated that applicationOpen was working from a cold start. In any case, we’ll look into it this Monday and make both platforms do the right thing.
Regarding #2 about the received facebook URL, that’s not a bug. The URL you are receiving is exactly how the facebook app is giving it to you via its Android intent. The facebook SDK that we are using is *not* a factor because the intent is sent from the facebook app and receiving by our Corona activity… meaning that the facebook SDK that we use never touches it. Just so you know, all of the useful information is within the Intent’s “extras” bundle, which we provide via the “androidIntent” property in the launch arguments and applicationOpen. Within that intent’s extras, you will find properties such as “app_id”, “access_token”, “expires_in”, and “extra_launch_uri”.
If you want to find out everything that is within your Android intent, trying the below code at the bottom of your main.lua file…
[lua]local function printTable(table, stringPrefix)
if not stringPrefix then
stringPrefix = "### "
end
if type(table) == “table” then
for key, value in pairs(table) do
if type(value) == “table” then
print(stringPrefix … tostring(key))
print(stringPrefix … “{”)
printTable(value, stringPrefix … " ")
print(stringPrefix … “}”)
else
print(stringPrefix … tostring(key) … ": " … tostring(value))
end
end
end
end
local launchArgs = …
print("### — Launch Arguments —")
printTable(launchArgs)
local function onSystemEvent(event)
print("*** system event type = " … event.type)
if (event.type == “applicationOpen”) then
print("### — Application Open —")
printTable(event)
end
end
Runtime:addEventListener(“system”, onSystemEvent)[/lua]
[import]uid: 32256 topic_id: 29587 reply_id: 135203[/import]
Could you please help to clarify how to initiating of the dialog request with my own context ‘data’ ?
As described here: http://developers.facebook.com/docs/tutorials/ios-sdk-games/requests/
it is possible to send invitation to the friend like this:
facebook.showDialog( "apprequests", {message = "invite you to play this game!", data = "cutom\_data\_string\_here"} )
But unfortunately during receiving on the friend app there is only following URL available:
fb12345://authorize?expires\_in=3600&access\_token=ACCESSTOKEN&target\_url=http%3A%2F%2Fwww.facebook.com%2Fappcenter%2F12345
so the target_url parameter is available, but the request_ids parameters is missing 
Have you any ideas why this is not working? [import]uid: 207273 topic_id: 29587 reply_id: 136222[/import]
Sure. Just ask Ansca why they changed the API, and if you’re lucky you’ll get a proper answer. But most probably they’ll blame something else; either you or Facebook.
What you’re doing is completely right, and a few weeks back you’d get the request_id back in the Facebook event.response. Recently something has happened and now you get that useless URL back instead on iOS. On Android you get nothing, just an empty string. Or maybe it was the other way around, I don’t remember. One of them returns the useless URL, the other an empty string.
We finally gave up on Coronalabs way of dealing with the Facebook API - they break it on a monthly basis it seems - and removed all such dependencies completely by leveraging our own custom Friend selector and moving most of the critical stuff to be handled by our servers. [import]uid: 21746 topic_id: 29587 reply_id: 136224[/import]
thank you for your feedback haakon - this is what I was afraid of 
I was also looking on Game Center integration on iOS - there are few methods available there how to get GC friends information (their IDs, etc.) - but there is also no way how to invite friend to your game.
So in summary it looks like there is now way (at least for now) to create multiplayer game on Corona SDK neither with using of Facebook or Game Center
[import]uid: 207273 topic_id: 29587 reply_id: 136264[/import]
I did a quick Internet search and found the following bug report on facebook’s website…
http://developers.facebook.com/bugs/465760136778889/
Apparently, the facebook app does not provide the “request_id” in the URL anymore unless you set up a “Mobile Web URL” on your facebook developer page. At least that’s the posted work-around on the above web page. I’m not in the office and unable to test this for myself at the moment, but I suggest that you give it a go.
One more thing. On Android, passing information via URL arguments is uncommon and are typically sent via an Intent’s extras bundle. If you can’t find what you are looking for in the URL on Android, then have a look within the Intent’s extras via the code snippet I’ve shared here…
http://developer.coronalabs.com/forum/2012/08/08/applicationopen-event-not-firing#comment-135203
[import]uid: 32256 topic_id: 29587 reply_id: 136289[/import]
@Joshua Quick - thank you for catch up on this!
After defining the Mobile Web URL on the facebook app I was able to get request_is parameter as expected! [import]uid: 207273 topic_id: 29587 reply_id: 136305[/import]
Glad I could help! And thanks for confirming that this setting worked.
Just so you know, we’re actively writing up new documentation that provides instructions on how to set up the facebook developer page. This is because we get facebook tech-support questions multiple times per week and the vast majority of times it is due to configuration issues on the facebook developer page. We recognize that facebook does not make it obvious how to set it up, especially when you have to set fields such as mobile web url which is completely unrelated to deep linking. Hopeful our upcoming documentation will make it easier on everyone. [import]uid: 32256 topic_id: 29587 reply_id: 136382[/import]
Could you please help to clarify how to initiating of the dialog request with my own context ‘data’ ?
As described here: http://developers.facebook.com/docs/tutorials/ios-sdk-games/requests/
it is possible to send invitation to the friend like this:
facebook.showDialog( "apprequests", {message = "invite you to play this game!", data = "cutom\_data\_string\_here"} )
But unfortunately during receiving on the friend app there is only following URL available:
fb12345://authorize?expires\_in=3600&access\_token=ACCESSTOKEN&target\_url=http%3A%2F%2Fwww.facebook.com%2Fappcenter%2F12345
so the target_url parameter is available, but the request_ids parameters is missing 
Have you any ideas why this is not working? [import]uid: 207273 topic_id: 29587 reply_id: 136222[/import]
Sure. Just ask Ansca why they changed the API, and if you’re lucky you’ll get a proper answer. But most probably they’ll blame something else; either you or Facebook.
What you’re doing is completely right, and a few weeks back you’d get the request_id back in the Facebook event.response. Recently something has happened and now you get that useless URL back instead on iOS. On Android you get nothing, just an empty string. Or maybe it was the other way around, I don’t remember. One of them returns the useless URL, the other an empty string.
We finally gave up on Coronalabs way of dealing with the Facebook API - they break it on a monthly basis it seems - and removed all such dependencies completely by leveraging our own custom Friend selector and moving most of the critical stuff to be handled by our servers. [import]uid: 21746 topic_id: 29587 reply_id: 136224[/import]
thank you for your feedback haakon - this is what I was afraid of 
I was also looking on Game Center integration on iOS - there are few methods available there how to get GC friends information (their IDs, etc.) - but there is also no way how to invite friend to your game.
So in summary it looks like there is now way (at least for now) to create multiplayer game on Corona SDK neither with using of Facebook or Game Center
[import]uid: 207273 topic_id: 29587 reply_id: 136264[/import]
I did a quick Internet search and found the following bug report on facebook’s website…
http://developers.facebook.com/bugs/465760136778889/
Apparently, the facebook app does not provide the “request_id” in the URL anymore unless you set up a “Mobile Web URL” on your facebook developer page. At least that’s the posted work-around on the above web page. I’m not in the office and unable to test this for myself at the moment, but I suggest that you give it a go.
One more thing. On Android, passing information via URL arguments is uncommon and are typically sent via an Intent’s extras bundle. If you can’t find what you are looking for in the URL on Android, then have a look within the Intent’s extras via the code snippet I’ve shared here…
http://developer.coronalabs.com/forum/2012/08/08/applicationopen-event-not-firing#comment-135203
[import]uid: 32256 topic_id: 29587 reply_id: 136289[/import]
@Joshua Quick - thank you for catch up on this!
After defining the Mobile Web URL on the facebook app I was able to get request_is parameter as expected! [import]uid: 207273 topic_id: 29587 reply_id: 136305[/import]
Glad I could help! And thanks for confirming that this setting worked.
Just so you know, we’re actively writing up new documentation that provides instructions on how to set up the facebook developer page. This is because we get facebook tech-support questions multiple times per week and the vast majority of times it is due to configuration issues on the facebook developer page. We recognize that facebook does not make it obvious how to set it up, especially when you have to set fields such as mobile web url which is completely unrelated to deep linking. Hopeful our upcoming documentation will make it easier on everyone. [import]uid: 32256 topic_id: 29587 reply_id: 136382[/import]
Is this still working on Android? We try to make this work on Android.
- Resume application
When we open the request from the Facebook App, we do get the event.url within the system event listener. So this works fine.
- Cold start application
In this case we to not get any event.url. Where do we get the url and the parameters from facebook? We also checked the launchArgs as described in the iOS Facebook Tutorial. But as expected they are empty on Android.