Linking to facebook share from android browser - android

I'm trying to link to the Facebook android app from the browser but can't find the right scheme. I looked at the suggestion from this post here and I changed some stuff around. When I try it in the browser it always takes me to the Play Store for Facebook and not the actual app, even though I have it installed. Also, when I try running the samples from the above post, they take me right to the QR scanner.
Here is my best attempt:
test me

Ok so it turns out I needed to edit the scheme to get to the app. Apparently, this works:
test me
I guess my next question would be how can I bring up the publish screen so a user can share to their profile.

Based on How do I pass parameters to android Intent in new scheme on chrome it was possible to share a profile by adding an extra user id parameter like this:
Launch Facebook
Unfortunately Facebook confirmed that this is not possible anymore since a security exception: Security exception when opening ProfileTabHostActivity through intent

Related

Deep linking from Facebook Ad to 3rd party app

I'm trying to setup deep links from a Facebook Ad to an app that I do not own (Shopee). Shopee does not provide any facility/guides to deep-link to them at the moment. I've tested that the app has properly setup deep linking on Android, i.e. clicking the link https://shopee.ph/Korean-Mini-Cute-Sling-Bag-i.30650129.2385916193 on Slack or Gmail properly opens the Shopee app.
Is it possible to make deep links work on Facebook for apps that you do not own? So far, I've tried doing the steps detailed in https://developers.facebook.com/docs/app-ads/deep-linking/. However, I don't know where to get some of the platform settings needed by Facebook:
iOS
Bundle ID - where can I get this?
iPhone Store ID - Seems this can be easily taken when visiting the app store. I can get some of the details from https://shopee.ph/apple-app-site-association as well.
iPad Store ID - Similar to iPhone Store ID I guess.
Shared Secret - I'm someone who has no experience with iOS and Android programming. I'm afraid this setting is something that I couldn't get?
Android
Google Play Package Name - Should be com.shopee.ph
Class Name - I think this can be known by going through the app's apk/files
Key Hashes - Can this be taken from the app's apk/files as well?
I tried compromising by linking the Facebook ad to my website that has deeplinks. But clicking the links will just redirect Facebook's webview to the product's web info rather than opening the app.
I guess this question boils down to whether it's possible to get the app's Shared Secret for iOS and the Key Hashes for Android.
Any response will help me go to the right path or end the path altogether. Thanks.
Sorry, but if you don't own the app then you shouldn't possess shared secret and key hash of the app.
Shared Secret and Key hashes both are something that is very specific to the app created. It is mostly controlled by the app owner in case you need it you have to get that transferred from the app owner. But I doubt anybody will do that.
Also, this is some kind of hack that you are doing this should be definitely avoided without permission from the app owner.
If you are the owner then for
- Android you can try this url.
Have you tried with Android Intents? They can directly link to an app (including deeplink information). Of course you wouldn't now if its installed through adds beforehand. Firebase Dynamic Links solves that problem where you can decide to link to website or Play/App Store as fallback. They also open the native app from facebook browser (and others) and use Android Intents under the hood.
Think you can't use Firebase Dynamic Links for an app you don't own. But if redirecting to your own website is an option maybe you can implement a similar mechanic.
Here is the chrome documentation for Android Intents:
https://developer.chrome.com/multidevice/android/intents
Adjust also has a summary article about deep linking, covering Intents and iOS:
https://www.adjust.com/blog/dive-into-deeplinking/
As your expected behavior to open app but now it will just redirect Facebook's web view to the product's web. Unfortunately it is not currently possible to directly launch a third-party app from within the iOS Facebook app. This is a known issue that Facebook has essentially written off as wontfix. This is still possible in the Android Facebook app, but it's unfortunate they haven't been more transparent about the change to the iOS version because there is quite a bit of confusion about it.
But you cna do the same thing using services like Branch.io get around this by implementing a judicious combination of App Links, URI schemes, and iOS Universal Links. Essentially what you need to do is open a page in the webview and then have a button or other user-driven CTA event that launches the app from there. It's an extra step for the user, but currently the best workaround. If you just want to be able to post a link that goes into your app when it is installed and otherwise goes to a webpage (or the App/Play Store), then Branch links are definitely your simplest solution.

Facebook Deep linking for android app

I have a application and i have facebook page for the same.now whenever a user clicks on Use app(call to action) button on android device whether it is facebook android app or user is logged in from browser I need to open my app installed in user's phone.
I have searched so much but came across some old posts as facebook has introduces applinks.org meanwhile.
So I am not getting how to do this thing.
When you're setting up the Call To Action button on your page, you need to select App:
Then you will fill in a URL using your app's custom URL scheme in the Deep Link box (that's what actually launches your app on the visitor's device), and the package name of your app in the Package Name box (I believe Google uses this for verification purposes).
If you haven't set up a custom URL scheme yet, this Facebook docs page explains how. That will take care of opening the app (myApp://), but if you're wanting to go to a specific piece of content (myApp://path/to/content), then you also need to follow these directions.

Android Facebook requires reset for applinks to work

I have an applinks enabled app, together with applinks enabled webpage (pointing to the app). I'm trying to do this workflow:
In my app, share a link to my webpage as ACTION_SEND with EXTRA_TEXT
The webpage (e.g. http://lovelikeorhate.eu/question/LIKE/504) contains all the applinks and Facebook specific tags. You can try curl to see it.
Facebook creates a correct preview, using the og:title meta tag from the webpage. Facebook Object Debugger (https://developers.facebook.com/tools/debug/og/object/) doesn't show any errors and reports the Android App Links as present.
When I submit the post to Facebook and then click it in the Facebook app, a browser opens, i.e. applinks are not working.
If I re-login in Facebook, then the applink works as expected, starting my app. Merely deleting cache, killing Facebook app or restarting the device is not enough.
Any ideas what's causing this weird behavior? What should I change to make the applinks work on the first attempt?
I wouldn't worry about this as it's an edge case. The Facebook app may sometimes cache the result of your post, and won't necessarily have all the app links data on your device. However, users on other devices will have the appropriate app links data and link to your app. Eventually, the Facebook app will also refresh its data, and you'll be able to link from your device as well.

Native Facebook Login experience via browser

I have seen several flavours of this question going around but nothing exactly specific nor answered so trying it myself.
I am trying to build a Facebook login experience via the browser into my Facebook-based app that will require the users to not remember their passwords as much as possible. This means that if
they log in via their desktop browser and are already logged in, it will only ask them to 'OK' the permissions
they log in from their mobile browser and are logged in via their respective native app (Android/iOS), it will simply redirect them to the native app, ask for the app permissions and redirect them back to the success page on the browser
they log in from any browser and are not currently logged onto Facebook in any form, they have to enter their password and authenticate (whether natively or via browser this does not matter)
I know how the first can be done - that is pretty straightforward using the JS SDK. The second point is the tougher bit.
I am aware of existing custom URL schemes for Android and iOS but nothing specifically really mentions how that can be used for authentication and/or authorisation of Facebook apps. Does anyone have any ideas on how this can be done?
Thanks!
In iOS use iOS facebook SDK. It will handle the login process effectively in different situations depending on the resources available. Check out this answer to know about different login flows
Integrating facebook
You're looking for Single Sign On behavior- in Facebook, use the native SDK, and instructions for setting up SSO. It includes entering your bundle id in the settings and setting up a referring url name (the name of your app usually). So what happens is- if you launch safari mobile, and log into facebook. Then, launch your app, with good integrated SSO. Then, it won't require you to login/pass, because it knows you've authenticated via browser. Same with Android.
I think what you are looking for (at least for Android) is starting an Intent on certain schema that will open Facebook app.
This is answered here Android facebook intent to show profile with class com.facebook.katana.ProfileTabHostActivity doesn't work any more

HTML redirect to custom protocol only when supporting Android app is installed

I would like to have all URIs intended for my app launch my app if it is installed. And if it is not installed I would like to display a web page about my app. After looking at the following two questions, I still can't find a reliable solution.
Intent filter works from Google+, but not Chrome & Facebook
Android - redirect to store if app not installed (launch from website)
The problem with the first solution (redirect) is that redirecting to a custom protocol leads to an error page when the app is not installed, as described in the second question. The problem with the second solution (use http protocol with intent filter by server name) is that Chrome doesn't honor the intent filter, as described in the first question. So now the question is, is there any way to prevent the redirect from occurring when no supported app is installed?
This guy seems to have a solution to your problem:Android Browser Facebook Redirect Does Not Always Trigger Intent for URL.
Or at least it is working quite well. Best thing I have found so far.

Categories

Resources