EddyVerbruggen / SocialSharing-PhoneGap-Plugin

👨‍❤️‍💋‍👨 Cordova plugin to share text, a file (image/PDF/..), or a URL (or all three) via the native sharing widget
MIT License
1.78k stars 909 forks source link

Phonegap build using Construct 2: Whatsapp doesn't share image #707

Open donrif opened 7 years ago

donrif commented 7 years ago

Hello, I'm building my game using Construct 2. For iOS, I compile my game with Phonegap. The plugin works perfectly when I want to share my screenshot on FB or Twitter (it shares the text and the image). But when I choose Whatsapp, it only shares the text, not the image.

This is the javascript code that I execute when I want to share: "window.plugins.socialsharing.share('This is my message', '" & share_var & "')"

"share_var" is a variable that I created that uses the CanvasSnapshot on Construct 2.

Any tips?

Edit: After a lot of test, here's the code that worked for me: "window.plugins.socialsharing.share(null, null, '" & share_var & "', null)"

If I insert text (first entry), it doesn't work on Whatsapp, it takes the text only and doesn't share the image.

Bootfit commented 6 years ago

Hi Donrif, sorry to resurrect an old thread, but I’m hoping you can help me.

I’m building an app in Construct 3 and I’m trying to get the PhoneGap/Social function to work also, but have been running into brick walls on the Scirra Construct forums for the past month or so when asking for help to implement it.

Is there any chance you can share how you got the function to work - If at all you did get it to work?

Thanks in advance :)

donrif commented 6 years ago

Hey there, no problem bro, as soon as i go home, i will check with you. Le mar. 26 déc. 2017 à 18:35, Bootfit notifications@github.com a écrit :

Hi Donrif, sorry to resurrect an old thread, but I’m hoping you can help me.

I’m building an app in Construct 3 and I’m trying to get the PhoneGap/Social function to work also, but have been running into brick walls on the Scirra Construct forums for the past month or so when asking for help to implement it.

Is there any chance you can share how you got the function to work - If at all you did get it to work?

Thanks in advance :)

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/EddyVerbruggen/SocialSharing-PhoneGap-Plugin/issues/707#issuecomment-353999091, or mute the thread https://github.com/notifications/unsubscribe-auth/AWV5Euf7OvBNvIrSqfzgFAZDAQ-WhLmmks5tETxXgaJpZM4KwmKH .

donrif commented 6 years ago

Here is how I implemented the plugin. For sharing your app, you basically add this code: "window.plugins.socialsharing.share('YOUR_MESSAGE', null, null, 'A_LINK_TO_YOUR_APP_OR_ANYTHING')" eddyverbrugen

It works perfectly.

I also made the image sharing work with this plugin. I implemented it in my app in a snapshot sharing method:

eddyverbrugen2

This works perfectly with Twitter, Whatsapp and others, except Facebook. In Facebook, the text added is not shared with the image.

I hope I helped you. ​

On Tue, Dec 26, 2017 at 6:35 PM, Bootfit notifications@github.com wrote:

Hi Donrif, sorry to resurrect an old thread, but I’m hoping you can help me.

I’m building an app in Construct 3 and I’m trying to get the PhoneGap/Social function to work also, but have been running into brick walls on the Scirra Construct forums for the past month or so when asking for help to implement it.

Is there any chance you can share how you got the function to work - If at all you did get it to work?

Thanks in advance :)

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/EddyVerbruggen/SocialSharing-PhoneGap-Plugin/issues/707#issuecomment-353999091, or mute the thread https://github.com/notifications/unsubscribe-auth/AWV5Euf7OvBNvIrSqfzgFAZDAQ-WhLmmks5tETxXgaJpZM4KwmKH .

Bootfit commented 6 years ago

Oh mate - I cannot thank you enough.

I've been tearing my hair out for weeks wondering how to implement this.

A 1000 times thank you.

Merry Christmas!!

Merry. Merry. Christmas!!!

Owe you big time!

donrif commented 6 years ago

God bless brother, glad I helped! ;)

On Tue, Dec 26, 2017 at 11:15 PM, Bootfit notifications@github.com wrote:

Oh mate - I cannot thank you enough.

I've been tearing my hair out for weeks wondering how to implement this.

A 1000 times thank you.

Merry Christmas!!

Merry. Merry. Christmas!!!

Owe you big time!

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/EddyVerbruggen/SocialSharing-PhoneGap-Plugin/issues/707#issuecomment-354023715, or mute the thread https://github.com/notifications/unsubscribe-auth/AWV5Eqb-oRCOADHtdDOIy9pjaGZE3v4Mks5tEX34gaJpZM4KwmKH .