3

My requirement is user should redirect to particulate application page after clicking the facebook post.

I took reference from this link: Cannot get the new AppLinks to work on iOS or Android and created demo according to that.

I am able to generate canonicalUrl (canonical_url : https://fb.me/7686509******* )with use of php script and app_link_hosts id.

I am sharing this url in my publishFeedDialog like this params.putString("link", canonical_url),post shared successfully.

Then I am going in my facebook application and clicking on the same shared post this will redirect user to my application page and application opens automatically which is fine.but I want user should redirect to inner page of my application.

I am facing problem to redirect user in application detail page from facebook post.Please anyone provide detail on this.

My Quesions and Queries are as below:

   - How can I redirect user to application detail page with use of Applinks?
   - Is it feasible to implement such functionality with use of Applinks?
   - how to set target_url properly for detail screen of application? 

I have also checked Documentation from: http://applinks.org/documentation/ but not getting enough help.also did email to support team of applinks.org and waiting for their reply for same.

Community
  • 1
  • 1

2 Answers2

0

Assuming that you have all the intent filters set up correctly in your AndroidManifest.xml, the FB app should open your app with an ACTION_VIEW intent, and the "data" field in the intent should be the url that you specified in the al:android:url meta tag.

Your app then needs to parse that url, and go to the right detail page based on that url.

Ming Li
  • 15,672
  • 3
  • 37
  • 35
  • all the intent filters related things are set properly in android menifest.my link is also redirecting user to first page of application.Issue is only with detail page. –  Feb 20 '15 at 04:10
  • Right, so you should call getData() on the incoming intent, and parse that and direct the user to the right detail page. – Ming Li Feb 20 '15 at 23:14
0

I've gone another way: 1) create custom FB object/action/story with some additional properties 2) create FB hosted app link https://fb.me/1234xxx 3) will custom properties with data (in my case some text for story and JSON for transfer to FB) and post the story with this hosted url as a link, action and object 4) from FB iOS app open post and FB launches my iOS and pass me action and object IDs 5) using this object ID i fetch the object with the data and can not only open the necessary view but put the data from JSON to database ;) In such way i can transfer chunks of data for users collaborating via FB using my app ))) But problems also exists: 1) using SharedDialog is good but to slow but can pass data with images for story 2) using shared API much better but with attached image (for nice story) it creates not link but posted image 3) if i set in fb.me url for my web page (which also has JS for parsing the data in the object) it opens it from post but do not add query parameters from post with object id. 4) if i use my web page with applink meta tags post only opens with this page but if i post the link of the page without custom action/object (without query parameters) my iOS app opens on the main screen (because it can't get object id) If You need not web version to use but only iOS/Android You can use the technic i've described - really it works fine and quickly.