Share a post so that it opens on Discourse Hub App

When I share a link to a post on whatsapp for example, it opens in the phone’s browser rather than the discourse hub app even though it’s installed and has the relevant forum connected. This means that they user needs to then log in through the phone’s browser rather than use the app.
Any way to share the link so it points to the App instead?

1 Like

I’m not sure exactly how this works, do you know @pmusaraj?

1 Like

Our iOS app has a share extension. It means that on most apps, you would see this when sharing a link:

If you can get whatsapp to show you that Share dialog, then you can send the link to our app. But I don’t seem to be able to do that on my phone on whatsapp.

3 Likes

I think @gordon_mrmoco is trying to click on a link in WhatsApp (or a text message or any app) and have Discourse Hub automatically open.

I think this is possible on Android with App Links (Handling Android App Links  |  Android Developers) and iOS with Universal Links (App Search Programming Guide: Support Universal Links)

On Android: Add Android App Links  |  Android Studio  |  Android Developers

Android App Links are HTTP URLs that bring users directly to specific content in your Android app. Android App Links can drive more traffic to your app, help you discover which app content is used most, and make it easier for users to share and find content in an installed app.

To add support for Android App Links:

  1. Create intent filters in your manifest.
  2. Add code to your app’s activities to handle incoming links.
  3. Associate your app and your website with Digital Asset Links.

The App Links Assistant in Android Studio 2.3 and higher simplifies the process in a step-by-step wizard, as described below.

On iOS:

To create a secure connection between your website and your app, you establish a trust relationship between them. You establish this relationship in two parts:

It doesn’t seem too difficult to set up, although I think it would have to be setup by the Discourse team, and once set up, should allow links to automatically open in Discourse Hub if it’s installed.

Edit: I suppose it doesn’t have to come from the Discourse team and can be a PR :slightly_smiling_face:

Actually, this is difficult to do in the DiscourseHub app. We’d have to add thousands of Discourse site domain names to the com.apple.developer.associated-domains entitlement… the Universal Links system is not built for that, it’s built to associate a few domains with an app, not thousands.

(On Android, this should work out of the box with PWAs.)

1 Like

Ugh, bummer :confused: if this will work on Android PWAs, is there any hope this will work on future iOS PWAs?