Facebook Share From Mobile Web to Native App Without Javascript? - android

I am looking to let a reader of my site share the url from a mobile browser to their native facebook app without using javascript, or having them login through the cumbersome web process.
In the past, this was accomplished using the fb://publish/profile/me?text=blah url scheme for both iOS and Android. When clicked, this link would open the native app and start a new share dialog.
Sometime in late 2013/early 2014 though, this method stopped working. Is there a more current way to use a static URL to open up a native share dialog on iOS and/or an Android Intent? A canonical answer is needed here as searching SO leads to a ton of old, deprecated dead ends.

It's crazy that facebook doesn't have the latest URI schemes documented. Whatsapp, twitter, mail, sms, tel all have them available and are working.
Whatsapp:
whatsapp://send?text=Hello%20World!
Twitter:
twitter://post?message=hello%20world!
Mail:
mailto:<address>[?<header1>=<value1>[&<header2>=<value2>]]
SMS:
sms:+15105550101?body=hello%20there
Tel:
tel:<phonenumber>
I've been researching methods of HTML5 interaction with phone features (intents), maybe there is a way to open the mobile phone share menu from a web url? This would allow the user to share an article, per say, with any native app if installed (fb, twitter, etc...)

I don't know if you've come across this thread, but the guy seems like did some reverse engineering and has a full list of all Facebook custom URL schemes

In short there is NO official or unofficial way to do this anymore (or yet).
The URL schemes above described was never documented as an official way to open the the sharing dialog.
BUT
There is the new AppLinks framework.
The App Links framework is documented here
What it does is basically allows you to have meta tags on certain URLs that let you launch your (or any) app from Facebook. Basically Facebook checks if your page supports an app link and then links directly to your app
So, theoretically it should be simple to launch the Facebook app from your browser if you have it and if not load another link. (which is basically what you need). However even though Facebook created it they haven't put it on their pages yet. (in other words in the future these meta tags might work to open the apps).

Related

DeepLinks and proper way to deal with 404

so I want to have some DeepLinks on my webpage that fire up a mobile app I created on my mobile device using Unity.
The DeepLinks are constructed in a way:
myapp://view?itm=356723
Now, if my mobile phone has the app installed, it will launch the app and use the information provided by the DeepLink properly. If I do not have the mobile app installed, I'll get a 404.
What I'd like to know: Is there any way to provide a special 404-page that tells the user to download the App with a link from the app-store instead of redirecting to the standard 404-page the webserver provides? For this, I'd like to assume that I run on a recent Apache Webserver and have access to .htaccess and everything else. Even PHP is a given.
I know that there are sophisticated solutions for DeepLinking like branch.io but let's say I want to keep things simple and use this approach.
Thanks for your help!

How to stop developers from opening my website in a WebView?

An unauthorized person has created an android app on our name, logo and showing our website content as is. It has fully functional browser experience in an app. This person is using advertisement to make money using our content.
Our Website: http://www.chittorgarh.com
Fake App: https://play.google.com/store/apps/details?id=davidjack.chittorgarh
What we did in last 2 days:
Complaint to Google. No response so far.
Sent emails to fake app publisher. No response so far.
Created our own official app using exact same way and made it live. We will start pushing it through our website soon. It’s not what we want but do not see any other option.
https://play.google.com/store/apps/details?id=ipo.chittorgarh
Question: How do disable all the traffic from the Fake App?
Tried User-Agent but no luck as it’s exactly same as someone opens the app in chrome on android.
It is basically a web browser within an app, so there isn’t any way around this, if it’s publicly accessible via the web then it’s available to anyone to access or implement within a web view.
All you can do really is create your own app, and add a message regarding the fake app on the homepage of your website.

Open URL with external browser in Messenger

I'm building a (Facebook) Messenger chatbot which needs to send a URL to the user which may be handled by a specific application instead of a web browser.
By default messenger opens URLs in a integrated web view instead of delegating the task of finding a suitable app to the OS.
I cannot force my users to change their Messenger settings to disable the web view, so what is a way of telling messenger not to try and open my link in its embedded web view?
The issue is not and Android one since intent filters are set up and working correctly. Messenger simply doesn't publish an intent when the URL is clicked, and only displays it in a web view.
All URLs in FB Messenger open in their webview, but you can still use deeplinks to open a native app and launch a specific screen on the user's mobile device. That way, when the user clicks on a given URL / URL button, they will "switch" from the FB Messenger chatbot to an application on their mobile device.
To create a deeplink for your Android app, it seems that the Mobile Deeplinking Library highlighted on this website (Section 2.3) will help. It lists instructions and details about how to set up your own deeplinks for iOS and Android applications.
I've only done a bit of research into mobile deeplinking but I hope this helps solve the problem!

Facebook In App web browser clears my browser cookies after 2-3 days

I have articles which are posted on Facebook for our subscribers and when a user clicks in one of the links they get re-directed to a mobile-site where they login, the problem is now after a a few days 2-3 days the mobile site asks them to authenticate again.
Im guessing Facebook in app browser clears my cookies but what i need to know is how does it manage its cookies especially for external sites. I tried the Facebook developer website there's no documentation on how this in app webview/browser works.
Background Info
Facebook in app browser is rather a webview which renders all the links which user's browse so instead of delegating the rendering to an external browser it handles everything on its own. This comes with limited functionality of course, Facebook added this in app browsing functionality to keep user's in session, because most of the time if user's make use of external browsers they don't come back into the app.
With the above background information Facebook browser is accessible to developer's in a sense that they may choose to use Deep-Linking if the browser doesn't conform to their specifications because the browser is closed i.e you can not modify or rather interact with it, thats why the deep linking functionality allows for developers to give user's an option to choose wether they wish to use their app this is if they have it installed in their mobile devices.
Cookies
Cookie management entirely depends on the In-app browser which if a user wishes to clear them then they can do so via their app settings. Since Facebook in-app browser manages its own cookies thus if a webpage is rendered by the in-app browser it will entirely depend of the in-app browser if its time to clear them from the device.
Deep Linking Overview
App Links is an open standard to deep link to content in your app. When someone using your app shares content to Facebook or another App Links-enabled app you can create a link that makes it possible to jump back into your app from that piece of content.
App Links work by adding metadata to existing URLs on the web so that they can be consumed by your app. If your app doesn't have a web presence with content you can annotate, you can also use a Facebook-provided service to host the data.
The Facebook's app for iOS and Android support App Links today. When the Facebook app comes across a link that supports App Links it will launch your app with the right information so someone can see the content immediately and quickly.
How App Linking Works
A person clicks on a story on Facebook
If someone shares a story on Facebook with content from your app, people can click on the story to view the content in your app. The URL shared to Facebook contains App Link metadata or be a Facebook-hosted URL.
Facebook app looks up the URL to see if it supports App Links
Once someone clicks on a story, the Facebook App does a lookup to see if the content supports App Links. if it does, the Facebook App takes people to your content, either in a web view or by launching your app and linking to the content, depending on the following criteria:
Whether people have your app installed
Whether the device is and Android or iOS device
Whether your app is mobile only
App Links has the following requirements:
If the content is a web page, your web page must include markup to let the app know what app should be launched.
If the content is mobile only, you must still supply a valid http(s) URL that hosts the App Link metadata. Facebook provides a Hosting API for App Links to make it easy for app developers to support App Links content without having to set up a web server.
In order to accept incoming App Links, your app will need to be set up to support them. We cover how to do that for both iOS and Android.
Launching Outbound Apps
It's possible for any app to do what the Facebook app does and add support to launch other apps based on App Links. If you've got an app where people want to click through to links instead of just going to inbound links, we've also provided a document that covers how to add support for the outbound navigation protocolto your app.

'Share Functionality' for Mobile Web Apps

If I add a 'mailto:' link to my Mobile web app, smartphones know to open up the native mail app, is there something similar for 'sharing'?
I ask because on my Android 2.2, if I 'select text' using the browser's menu option, and then I select some text, I get presented with a 'share via' option that opens a native dialog with options to share via gmail, facebook, etc... I'd like to trigger this dialog from my Mobile Web App. Is this possible?
Thanks in advance for any help, much appreciated as I couldn't figure it out on my own. :)
Here a tutorial but I don't know if it works for mobile web apps.
http://mobile.tutsplus.com/tutorials/android/android-sdk-implement-a-share-intent/
If your web app is wrapped in a native layer (via Phonegap or by manually creating the native layer yourself), you can communicate your intention to share to the native layer by various means (like providing a url with a custom protocol that only your native layer intercepts, or via javascript callback functions) and delegate the share intent to your native layer.
Any data needed to be shared can be parsed from the custom url or be passed as parameters in the callback function.

Categories

Resources