How do I share my screenshot

0 favourites
  • 9 posts
  • Okay, i had another topic before, how to save an screenshot locally on the device....i had no respond - sadly, but anyway i tried to implement the socialshare plugin for phonegap.

    Did someone implemented this before? I was following the instructions on the npm side - so my code snippets looks like this:

    Used Plugin: cordova-plugin-x-socialsharing.

    Source Site: https://github.com/EddyVerbruggen/Socia ... n#manually

    Screenshot of my code snippet in c2: https://imgur.com/a/xJ2y8

    or this execution part (same as in the screenshot)

    "window.plugins.socialsharing.shareViaEmail('Message','Subject',['example@mail.com'],null,null,'cb_ScreenshotLink'

    );"

    could you tell me if i made everything right? Because i have no result if iam pushing the "share" button. Nothing appears

  • Okay - ive made the plugin work....now the only part is to get the image into the mail or download.... (excample images . f.e: https://www.google.nl/images/srpr/logo4w.png' working ) but currently my screenshot is not appearing...

    "window.plugins.socialsharing.share('Message and image', null, ' " &CanvasSnapshot & " ', null)" <- trying this one right now

    ive made it via local storage and used a global varialbe (text) to save the snapshot data....but this doesnt work for me....

    see source: https://www.scirra.com/tutorials/1457/s ... oid/page-4

  • Update: Solved-yea!

  • HI Congrats2u, can you tell me how you managed to get the plugin to work? I'm currently trying to use this but nothing happens when I touch my button.

    On object touched> Share Button> Execute javascript:

    "window.plugins.socialsharing.share('I've just Completed Round 1 in..."&newline&""& Round1TotalScore &" ' SHOTS !!!"&newline&"Try yourself now!!"

    There's also a Facebook option:

    On object touched> Facebook Button> Execute javascript:

    "window.plugins.socialsharing.shareViaFacebook('I've just Completed Round 1 in..."&newline&""& Round1TotalScore &" ' SHOTS !!!"&newline&"Try yourself now!!"

    Neither of my buttons do anything! I'm just wondering what step you took to get past this please? I need to get this part working before I can start to think about adding screenshots.

    Thanks!

  • Update: Solved-yea!

    Congrats2u Could you explain to us a little bit more of how you implemented this? Please...

  • Iolva

    I spent about 8 hours on this and finally did it! (at least on android)

    Add Browser -> Execute Javascript "window.plugins.socialsharing.share('Your message you want to share');" action to the project. Export it for Cordova with min SDK=5.0

    Then I followed this great tutorial. On page 3 before executing "cordova prepare" command you need to run

    cordova plugin add cordova-plugin-x-socialsharing

    This will add the social sharing plugin to the project.

    Use "cordova build android", upload apk to the phone and run.

    Alternatively you can use Construct 3 service to build the app, but you still need to add the plugin first.

  • dop2000

    Thanks for your comment, I have added the cordova plugin and it works, but I can't share a canvas screnshot? Do you have any idea how to make it possible?

    Thanks again!

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Have you tried following the steps from this tutorial?

    scirra.com/tutorials/1457/screenshot-sharing-ios-android/page-1

  • dop2000

    Done! I was missing the "CanvasSnapshot" expresion, thanks!!

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)