Prompt Share Dialogue

The Prompt Share Dialogue JS Bridge in Twinr allows you to invoke the device’s native share sheet to let users share a URL (optionally with a title) directly from your app.

JavaScript Function

twinr_share_page()

Function Variants & Usage

1. Share current screen URL

twinr_share_page();

✅ This will share the current webview page URL automatically.


2. Share provided URL with title

twinr_share_page("https://twinr.dev", "Twinr");

✅ This will share the provided URL with a title ("Twinr") to give context in the sharing platform.


3. Share provided URL without title

twinr_share_page("https://twinr.dev");

✅ This will simply share the provided URL without any additional text/title.

Parameter
Type
Required
Description

url

String

Optional

The link you want the user to share.

title

String

Optional

A short title or message that appears along with the URL.

Example Use Case

twinr_share_page("https://myapp.com/invite", "Join me on this awesome app!");

➡️ Opens the native share sheet with the message and link prefilled.

Use Cases

  • Share invite links

  • Promote blog posts or products

  • Let users easily share content or deals

Last updated

Was this helpful?