2

I am working on a website and the requirement is that user's can share a page, link or image

I want to make a share button on my webpage which allows user to share a link, image, etc via the apps installed in the user's phone. How can I achieve that.

It's should be like the share panel as shown in the image below

enter image description here

kartik
  • 583
  • 8
  • 24

3 Answers3

0

Loks like you want something like this: Android get url from browser

Also look through this link https://developer.android.com/training/app-indexing/deep-linking.html

Community
  • 1
  • 1
SAM_U_RAI
  • 65
  • 6
0

Not very clear about the question. But from what I understand, you want to share a particular page from your app, so it can be visited using a shareable link.

I think you're looking for is Deep Linking.


Update: HTML Sharing Buttons: https://www.addtoany.com/buttons/for/website

  • I want to share the link of my webpage through the apps installed on the user's phone like, Whatsapp, facebook, twitter, etc. Please read the updated question description. – kartik Jan 25 '17 at 08:34
  • No, I need something like this - https://paul.kinlan.me/sharing-natively-on-android-from-the-web/ , check the share button in this post – kartik Jan 25 '17 at 09:00
  • The share button on page is literally a Tweet Button. The link I shared with you has that functionality. Cheers!! –  Jan 25 '17 at 09:08
0

I believe that the Web Share API is what you are looking for.

It allows you to initiate the share intent via javascript. Android then displays the exact same share popup as in native apps.

Example from MDN:

navigator.share({
  title: document.title,
  text: 'Hello World',
  url: 'https://developer.mozilla.org',
});