Telerik-Verified-Plugins / SocialSharing

This PhoneGap plugin allows you to share text, an image, or a URL (or all three) via the native sharing widget of your Android, iOS or WP8 device.
27 stars 6 forks source link

How to share Image + Text + URL via WhatsApp #1

Closed owidat closed 10 years ago

owidat commented 10 years ago

I'm using this plugin in my project with Cordova 3.0 and Telerik AppBilder, My application is targeting iOS and Android.

When the user select sharing via whatsapp, the only thing being share is the photo, is there any other solution to share (image, text and url) to whatsapp.

My code:

        window.plugins.socialsharing.share( 
        msg, 
        imgUrl, 
        url, 
        [function(result) {alert('success'); console.log(result)}], 
        [function(result) {alert('error'); console.log(result)}]);

Also when I use:

        window.plugins.socialsharing.shareViaWhatsApp( 
        msg, 
        imgUrl, 
        url, 
        [function(result) {alert('success'); console.log(result)}], 
        [function(result) {alert('error'); console.log(result)}]);
EddyVerbruggen commented 10 years ago

Hi,

WhatsApp is a bit 'different'. See these restrictions for iOS for example: https://www.whatsapp.com/faq/iphone/23559013

You can send an image OR a piece of text. Therefore the plugin sends an image when it was passed, put if you leave out the image it will send any text you pass into it. If you only pass a message and a URL the plugin concatenates those for you.

Hope this clarifies things a bit - in the meanwhile let's hope WhatsApp will take advantage of the new iOS8 extensions feature so it comes more in line with Twitter etc.

Best regards, Eddy

damianpumar commented 8 years ago

Hi! use my Plugin! https://github.com/Damian-Pumar/Xamarin-Plugins

ghost commented 8 years ago

Hi Damian, Do u have anything for sharing of (image + text) on whatsapp at the same time from another ios app(objective c or swift)?

damianpumar commented 8 years ago

Hi piyush-verma, I created Android plugin to sharing image and text at the same time.

void ShareImage(String urlImage, String pathToSave, String title, params String[] comments); https://github.com/Damian-Pumar/Xamarin-Plugins/blob/master/UI.Droid/Plugin/ShareImageTask.cs

I used Xamarin for develop this plugin, you can sharing image and text using url for the image. Regards.

keyurshah070 commented 8 years ago

@Damian-Pumar

Do you have any solution to share image from web for PHP or any hint ?

Kindly looking forward for your response.

gomathyfollowon commented 6 years ago

Shall i know whatsapp share dynamic image and text, is possible at mobile website, any updates? have the plug-in/functionalty to share the images on whatsapp?

Damian-Pumar

thankyou

sri94aa commented 6 years ago

Hi,

When I pass the URL as a parameter, I am getting it as a text only and not as an hyperlink. Can anyone tell me how to resolve it?