One of the most interesting aspects of
sharing to Facebook from your app is that when people engage with the feed stories posted from your app, those stories can send people to
your app or your app's Google Play listing, driving traffic and app
installs. You can implement this behavior using App Links.
Facebook's Mobile Hosting API for App Links:
If your application doesn't have a website for content you want to share to Facebook, you don't have public web URLs which you can annotate to support App Links.
For these types of apps, Facebook provides an App Links Hosting API that will host App Links for you. With the Hosting API you can create and manage your App Links for all the mobile environments you support.
This is the typical flow to configure an App Link for a piece of content:
Please follow below steps for generate app linking.
For web service, In request Params we need to send below parameters.
You create a new App Link object for a content targeted to iOS & Android like this
A successful call returns an ID that represents the App Link object hosted on Facebook,
for example:
Return : {"id":"643402985734254"}
You can retrieve the canonical URL that points to your new App Link object through this API call:
Where
The filter should respond to the
For example, if I see a story on my Facebook feed about one of my friends completing this share tutorial and I tap on it, I will expect to be redirected to a view in your app that features this tutorial and not to your app's main activity.
If you use the App Links Hosting API, the
In the code sample below, we're simply logging the target URL, but you should direct people through the appropriated flow for your app:
https://developers.facebook.com/docs/applinks/android
https://developers.facebook.com/docs/applinks/add-to-content
https://developers.facebook.com/docs/applinks/hosting-api
App link Flow
Facebook's Mobile Hosting API for App Links:
If your application doesn't have a website for content you want to share to Facebook, you don't have public web URLs which you can annotate to support App Links.
For these types of apps, Facebook provides an App Links Hosting API that will host App Links for you. With the Hosting API you can create and manage your App Links for all the mobile environments you support.
This is the typical flow to configure an App Link for a piece of content:
- Create a new App Link object. You can set up an object for one platform or several at the same time.
- Save the App Link object ID that's returned.
- Use that ID to get the URL you can use to share the content.
- Configure additional platforms that you support.
- If supporting Android, configure your app's manifest file for the configured URLs.
Please follow below steps for generate app linking.
For web service, In request Params we need to send below parameters.
iOS: url, name
Android: url, name
Step #1: Generate App Access Token (Ref. https://developers.facebook.com/docs/facebook-login/access-tokens#apptokens)
GET /oauth/access_token? client_id={app-id} &client_secret={app-secret} &grant_type=client_credentials
Step #2: Generate App Link using generated App Access Token (Ref. https://developers.facebook.com/docs/applinks/hosting-api)
You create a new App Link object for a content targeted to iOS & Android like this
curl https://graph.facebook.com/app/app_link_hosts \
-F access_token="APP_ACCESS_TOKEN" \
-F name="iOS App Link Object Example" \
-F ios=' [
{
"url" : "applinkFB://showApp/54eee6292658c7df25000004",
"app_store_id" : 570281083,
"app_name" : “appName”,
},
]' \
-F android=' [
{
"url" : "applinkFB://showApp/54eee6292658c7df25000004",
"package" : "com.packagename”,
"app_name" : “appName”,
},
]' \
-F web=' {
"should_fallback" : false,
}'
A successful call returns an ID that represents the App Link object hosted on Facebook,
for example:
Return : {"id":"643402985734254"}
Step #3: Using generated ID(YOUR_APP_LINK_HOST_ID) which represents the App Link, you need to call another API which will return "canonical_url"
You can retrieve the canonical URL that points to your new App Link object through this API call:
curl -G https://graph.facebook.com/YOUR_APP_LINK_HOST_ID \
-d access_token="APP_ACCESS_TOKEN" \
-d fields=canonical_url \
-d pretty=true
Where
YOUR_APP_LINK_HOST_ID
represents the id returned from creating your App Link object. Your response will look like this:
Return:
{ "canonical_url": "https://fb.me/643402985734254", "id": "643402985734254"
}
Support sharesample URLs in Android
When a shared link is tapped your Android app is launched through the URL specified in the App Link object you just created (if you didn't specify a url, then it will use the canonical URL - i.e. the https://fb.me/xxxxx URL). To set up your app to respond to this URL, you need to add an intent filter in your app's manifest file.The filter should respond to the
applinkFB
scheme (if you didn't specify a URL, then your filter should respond to the fb.me host and https scheme), handle implicit intents, and accept the ACTION_VIEW
action. The example below adds an intent filter to the MainActivity that handles this:...
Once you've set up your web pages based App Links,
you're ready to handle incoming links to your app.
Handling incoming links
To ensure an engaging user experience, you should process the incoming intent information when your app is activated and direct the person to the object featured in the story they're coming from.For example, if I see a story on my Facebook feed about one of my friends completing this share tutorial and I tap on it, I will expect to be redirected to a view in your app that features this tutorial and not to your app's main activity.
If you use the App Links Hosting API, the
Intent
data will look like this:data: "
applinkFB://showApp/54eee6292658c7df25000004?target_url=https%3A%2F%2Ffb.me%2F643402985734299" extras: al_applink_data: <Bundle containing App Link data>
In the code sample below, we're simply logging the target URL, but you should direct people through the appropriated flow for your app:
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); FacebookSdk.sdkInitialize(this); ... Uri targetUrl = AppLinks.getTargetUrlFromInboundIntent(this, getIntent()); if (targetUrl != null) { Log.i("Activity", "App Link Target URL: " + targetUrl.toString()); } }
References:
You can get more details about overall
implementation
at
https://developers.facebook.com/docs/applinks/android
https://developers.facebook.com/docs/applinks/add-to-content
https://developers.facebook.com/docs/applinks/hosting-api
thanks for sharing wonderful information from your blog. and great doing in this about coding. keep update more useful information.
ReplyDeleteSEO Training in Chennai
ReplyDeleteThank you for having taken your time to provide us with your valuable information relating to your stay with us.we are sincerely concerned.., Most importantly, you Keepit the major...
hadoop Training in Chennai
I always prefer to read the quality content and this thing I found in you post. Thanks for sharing.A very good resource for everybody that wants to read a good blog.
ReplyDeleteGoogle App Integration Madurai
Wanna great article that very useful. All things which specify is a very interesting for read.SEO Company in
ReplyDeleteChennai
Nice post... thanks for sharing....!
ReplyDeleteseo services bangalore
Great post.
ReplyDeleteThanks for sharing. Picked up some good and valuable insight.
Android Training in Chennai
ReplyDeleteinteresting blog. It would be great if you can provide more details about it. Thanks you
Java and J2EE Training in Chennai - AmitySoft
good informative blog.I got some new techniques to link facebook with googles Api ,It really helps to teach our students in android development program Thanks for the post
ReplyDeletethanks for sharing information.
ReplyDeleteAndroid App Development Company
Thanks for sharing, I will bookmark and be back again....Facebook app development
ReplyDeleteThanks for sharing this informative articles ..glad to visit this blog.
ReplyDeleteBest Linux Training in Chennai
I recently came across your blog and have been reading along. I thought I would leave my first comment. I don’t know what to say except that I have enjoyed reading. Nice blog, I will keep visiting this blog very often.
ReplyDeleteFacebook
This is so useful to know about Android.
ReplyDeleteIpad Service Center near me
Great Post with Best information. For Iphone Service Center
ReplyDeleteThis is nice..
ReplyDeleteMobile App Development Company
Android app Development Company
ios app development Company
Mobile App Development Companies
"Great post. Keep it up. Thanks for advice. It is wonderful information for me. "!!
ReplyDeletemobile app development framework
ReplyDeleteWow.. Its really very good information Facebook app deep linking. I hope you will update more soon.Know more about Facebook app deep linking check out Magento Connector
Thanks for posting useful information.You have provided an nice article, Thank you very much for this one. And i hope this will be useful for many people.. and i am waiting for your next post keep on updating these kinds of knowledgeable things...Really it was an awesome article...very interesting to read..
ReplyDeleteplease sharing like this information......
Android training in chennai
Ios training in chennai
I simply want to say I’m very new to blogs and actually loved you’re blog site. Almost certainly I’m going to bookmark your blog post . You absolutely come with great well written articles. Thanks a lot for sharing your blog.
ReplyDeleteBest Android Training in Velachery | android development course fees in chennai
This information is impressive; I am inspired by your post writing style & how continuously you describe this topic...Android Training in Bangalore
ReplyDeleteVery Informative! This blog is great source of information which is very useful for me. Thank you very much for sharing this!
ReplyDeleteExcellent blog..Thanks for your ideas. android development company ludhiana
Wow, the application is very unique and I am looking forward to using it soon and understand how it functions. Thanks for sharing this important technological article with us. I have found it to be not only up to date but also informative. Students can access our professional literature review site by clicking on Well Analyzed Lit Reviews.
ReplyDeleteThanks...Great information provided about Android Training . I appreciate your work.
ReplyDeletetop android app development companies
This ARTICLE really helpful people to start the Android Development. I hope everyone using this to growing their business in public.
ReplyDeleteAndroid training in Nagpur
Wow... great article that very useful. All things which specify is a very interesting for read.
ReplyDeleteInterior Designers in Chennai
Interiors in Chennai
Good Interior Designers in Chennai
Very useful article.I really Greet admin to share this post...
ReplyDeleteInterior Designers in Chennai
Interior Decorators in Chennai
Interior Design in Chennai
it was nice post and very useful for me ios Online Training Bangalore
ReplyDeleteAwesome,
ReplyDeleteThank you so much for sharing such an awesome blog...Enem feels amazed
Nice blog..! I really loved reading through this article... Thanks for sharing such an amazing post with us and keep blogging...
ReplyDeleteFeels free to get amazing update regarding GATE ,
CBSE as well as on
SSLC .
ReplyDeleteEaster Day 2018
Happy Valentines Day 2018
ReplyDelete10th Result date 2018
12th Result date 2018
CGBSE 10th Result date 2018
RBSE 10th Result date 2018
Karnataka SSLC Result date 2018
Kerala SSLC Result date 2018
Tamilnadu SSLC Result date 2018
A nice article here with some useful tips for those who are not used-to comment that frequently. Thanks for this helpful information I agree with all points you have given to us. I will follow all of them.
ReplyDeleteWebsite Development Company Bangalore
Website Design and Development Companies in Bangalore
Outsource magento ecommerce services india
We will get all information regarding the Kerala SSLC results 2018kerala sslc resultsPlease click on this link
ReplyDeleteWe will get all information regarding the Karnataka PUC results 2018puc resultsPlease click on this link
ReplyDeleteComplete information regarding 2nd PUC Results 20182nd puc results 2018On a single click
This comment has been removed by the author.
ReplyDeleteWe will get complete information of Tamilnadu HSC Results 2018tamilnadu hsc results 2018Just click on this link
ReplyDeleteWe will get complete information of Tamilnadu SSLC Results 2018tamilnadu sslc results 2018Just click on this link
ReplyDeleteWe will get complete and detailed information of Kerala Plus Two Results 2018Kerala Plus Two Results 2018On a simple on this link
ReplyDeleteWe will get complete and detailed information of Kerala Plus Two Results 2018Kerala DHSC Results 2018On a simple on this link
ReplyDeleteThis comment has been removed by the author.
ReplyDeleteGood one,
ReplyDeleteRRB Result
This blog is very helpful for users who are looking for it. Thanks for sharing your thoughts on Android Online Training Bangalore
ReplyDeletevery useful blog.
ReplyDeleteThanks,
Home and Beyond is the best home interior designer in India.
modular kitchen designs
kitchen interior designs
modular kitchen showrooms in chennai
This is a perfect blog to learners who are looking for android technology, check it once at Android Online Training
ReplyDeleteRajasthan Board RBSE 8th Result 2018
ReplyDeleteThe VAT has changed the system of business in UAE and most of the business trust over Audit Firms in Dubai to manage their updates yearly, monthly or even quarterly to achieve the target. Well, this year is so crucial and auditors in town are rushing to update the accounts even so fast and better manner. The leading Top 10 Audit Firm in UAE representing the honorable function over best auditing firm of this year in a surprising event.
ReplyDelete4th of July Images
ReplyDeleteSSC CGL Result 2018
Eid Mubarak Pics
Jurassic World Fallen Kingdom
Fathers day Pictures
The Celebration of US Independence not only ends today, the celebration of July 4th continues the entire year and those who in need of happy 4th of July images for this year in HD format, please be in touch with us. We are here to help you in all kind of USA Independence day Images and Updates. check for recent updates of USA Independence at official website - USA 4th of july images
The SSC Notification has arrived so earlier and due to the same, the official Tier Series by Update of SSC CGL Result 2018 will reflect the Calander date for this Year. However, aspirants can follow up the latest SSC Result notification on our portal - ssc.nic.in
Ramadhan season has arrived, the new dresses, prayers, fasting has done. The people of the entire world are constituting to welcome their Eid and Latest thoughts like Eid Mubarak Wishes 2018 as well as Quotes, Greetings, images to their loved ones. You can check more updates about eid updates at - Eid HD Images
The Animated character Dinausers are very much font to us. The Jurassic Park really thrilled in our childhood. The Jurassic world part 1 also very much excited. Today, the team come up with the blockbuster thriller Animated 2nd part to set it to release on June and the Jurassic World Fallen Kingdom Review can be read here from the top notch as we can. for more visit Jurassic world official jurassicworld.com
The Fathers love is more than the thing that we tasted in this beautiful world. Here comes his day, celebrate the joyful occasion of fathers day with sending and inspiring him with Happy Fathers day images to make him tear that how u made him so valuable. for more collection of HD images searchFathers day Wallpapers
Very nice informative article about software and Service information, its very nice article. thanks for sharing such great article hope keep sharing such kind of article android app development
ReplyDeleteLearn more on Christmas HD Images
ReplyDeleteLearn more on Diwali Images in HD
Learn more on Happy New Year in advance
Learn more on Animated New Year Gifs
Learn more on Happy New Year HD Images
Learn more on New Year HD Images
Learn more on Best New Year Wishes
Learn more on Oscar nominees 2019
ReplyDeleteThe strategy you have posted on this technology helped me to get into the next level and had lot of information in it... Java Training in Chennai | Python Training in Chennai
Thanks for the guide. visit here
ReplyDeleteI have found something which helped me. Thank you! mobile app development in Singapore
ReplyDeletebig article on deep linking kindly visit my blog too about pnam orca error https://www.cdhpl.com/pname-com-facebook-orca/
ReplyDeleteInteresting blog, it gives lots of information to me. Thanks for sharing such a nice blog.
ReplyDeletePython Classes in Chennai
Python Training Institute in Chennai
AWS Training in Chennai
DevOps Training in Chennai
Angularjs Training in Chennai
RPA Training in Chennai
UiPath Training in Chennai
Blue Prism Training in Chennai
R Programming Training in Chennai
Quick & Easy Steps To Resolve Pname Com Facebook Orca Error
ReplyDeletePname com facebook orca is a major problem for many Facebook users. In this blog you will find quick & easily ways to solve Pname Com Facebook Orca Error
The blog was absolutely fantastic! Here Lots of great information. If you want to know more about Facebook App Development, then you can check out.
ReplyDeleteThank you so much for the sharing it was useful and very informative. We're leading interior designers in chennai, we do all interior contract work.
ReplyDeleteGood post. Thank you for sharing.
ReplyDeletemoviebox
This looks absolutely perfect. All these tiny details are made with lot of background knowledge. I like it a lot.
ReplyDeleteinterior designers in chennai
best interior designers in chennai
It is amazing and wonderful to visit your site.Thanks for sharing this information,this is useful to me...
ReplyDeleteinterior designers in chennai
Nice post...Thanks for sharing useful information..
ReplyDeletePython training in Chennai/
Python training in OMR/
Python training in Velachery/
Python certification training in Chennai/
Python training fees in Chennai/
Python training with placement in Chennai/
Python training in Chennai with Placement/
Python course in Chennai/
Python Certification course in Chennai/
Python online training in Chennai/
Python training in Chennai Quora/
Best Python Training in Chennai/
Best Python training in OMR/
Best Python training in Velachery/
Best Python course in Chennai/
You provided a great information ethical hacking online training india
ReplyDeleteI have picked cheery a lot of useful clothes outdated of this amazing blog. I’d love to return greater than and over again. Thanks!
ReplyDeletebest digital marketing company
digital marketing agency in chennai
digital marketing services
website design company
You blog post is just completely quality and informative. Many new facts and information which I have not heard about before. Keep sharing more blog posts.
ReplyDeleteinterior designers in chennai
It is for the first that I just visited your site and I find it really interesting! Congratulations! please visit for latesetnews
ReplyDeleteThankBiotech Internships | internships for cse students | web designing course in chennai | it internships | electrical engineering internships | internship for bcom students | python training in chennai | web development internship | internship for bba students | internship for 1st year engineering studentss for posting the best information and the blog is very good.
ReplyDeleteInformative Blog.Social Media Marketing is one of the trending course in India.NIMS is one of the best Institution providing Digital Marketing Course in Thrissur.100% Placement Assistance along with Career Counselling is offered.Learn more about @ http://nimslearn.com/
ReplyDelete