Reputation: 532
I'm developing an native only application, it has a Facebook sharing feature that share a RSS url. When use click on a post/story I would like Facebook to open my app and pass some data to open the right view for best user experience.
I have read and created an app link and get the canonical_url: https://fb.me/xxx as the tutorial here https://developers.facebook.com/docs/applinks/hosting-api
My share dialog:
FacebookDialog dialog = new FacebookDialog.ShareDialogBuilder(activity)
.setLink(link)
.setName(caption)
.setCaption(caption)
.setDescription(description)
.setPicture(imageUrl)
.setApplicationName(activity.getResources().getString(R.string.app_name))
.build();
mUiHelper.trackPendingDialogCall(dialog.present());
If I pass the link
param is the web url, for example http://google.com/..., when I click on the shared story Facebook open the browser to load that url.
If I pass the link
param is the canonical_url: https://fb.me/xxx, Facebook open my app directly and the received data from Facebook are:
Bundle[{extras=Bundle[{fb_expires_in=86400, fb_app_id=<app id>, fb_access_token=<access token>}], target_url=https://fb.me/xxx, referer_app_link=Bundle[{package=com.facebook.katana, url=fb:///, app_name=Facebook}]}]
What should I do to get the RSS url back from Facebook after use click on the shared story?
Upvotes: 1
Views: 893
Reputation: 532
I figured it out, just put the data after the canonical_url so when I got it back from Facebook deep linking, parse the url to receive data back, for example https://fb.me/xxx?data=xyz&foo=bar
Upvotes: 0