finscn / Ejecta

A Fast, Open Source JavaScript, Canvas & Audio Implementation for iOS
42 stars 6 forks source link

Share + screenshoot issue #33

Open matrixreal opened 8 years ago

matrixreal commented 8 years ago

1) on ios 9 for facebook (and on the real device) the text is blanc but image is okay (using canvas 2d) the text is okay on simulator but on real device is blank for twitter everything is okay

2) on webgl mode (facebook and twitter) the screenshoot is not apear correctly, it not show what are in the screen ... only color of the screen here is the call i use "appUtils.saveImage(canvas, '${Documents}/test.png', function(filePath) {console.log(filePath);});" later "social.openShare('i just smashed my best score on impossible arrow with 16 points', '${Documents}/test.png');"

img_2010

finscn commented 8 years ago

about 2) see https://github.com/phoboslab/Ejecta/commit/146a028540c7a66941851fe7b306e9f0971cf563

matrixreal commented 8 years ago

@finscn hi 1) any news about the ios9 facebook blank text problem on real device ?

2) in the post you send me you suggest 2 solution ? wich one should i use ?

thanks

finscn commented 8 years ago

about 1):

from http://stackoverflow.com/questions/29890747/ios-how-to-share-text-and-image-on-social-networks :

It seems that a recent update to the Facebook application has replaced the in-built Facebook share activity with one that ignores status text - If you remove the Facebook app from your device the text will be displayed using the code you have. If you have the Facebook app installed you get images, URLs but not the text

Facebook's policies don't allow you to pre-populate status messages and require all content to be user generated - while I understand the intention behind this, I personally think it is kind of stupid in many cases - For example in my game I want to pre-populate the user's score, but now I can't, so the user is presented with an empty dialog box. I will probably simply remove the Facebook sharing option as no-one will ever use it now.

This response from Facebook confirms that the behaviour is by design

about 2)

https://github.com/phoboslab/Ejecta/commit/146a028540c7a66941851fe7b306e9f0971cf563#commitcomment-13889862

matrixreal commented 8 years ago

Thanks a lot for your reply

Regarding 1) Showing text is not big problem we can just share an image (of the best score) + url and its okay

What do you do think?

Envoyé de mon iPhone

Le 2 nov. 2015 à 04:14, "finscn" notifications@github.com a écrit :

about 1):

from http://stackoverflow.com/questions/29890747/ios-how-to-share-text-and-image-on-social-networks :

It seems that a recent update to the Facebook application has replaced the in-built Facebook share activity with one that ignores status text - If you remove the Facebook app from your device the text will be displayed using the code you have. If you have the Facebook app installed you get images, URLs but not the text

Facebook's policies don't allow you to pre-populate status messages and require all content to be user generated - while I understand the intention behind this, I personally think it is kind of stupid in many cases - For example in my game I want to pre-populate the user's score, but now I can't, so the user is presented with an empty dialog box. I will probably simply remove the Facebook sharing option as no-one will ever use it now.

This response from Facebook confirms that the behaviour is by design

about 2)

phoboslab@146a028#commitcomment-13889862

— Reply to this email directly or view it on GitHub.

neodraw commented 8 years ago

Hello, finscn. Thank you for your extended fork. My skills programming is weak, so I use Construct2 and your code examples from https://github.com/finscn/Ejecta/tree/master/App-Example/example

When creating screenshots, I get the same result, only visible to the background color, the objects disappear. I do not quite understand comment foboslab and what you mean here: // renderSomething (); // ensure that gl is not be cleared in https://github.com/finscn/Ejecta/blob/master/App-Example/example/e-screenshot-share.js

So, please tell. What should I put in your example code, so objects do not disappear?

Thanks.

finscn commented 8 years ago

The best practice for screenshot is like this:

// in gameloop:
update();
render();
// after render:
if (toTakeScreenshot){
  appUtils.saveImage(canvas, ... );
  toTakeScreenshot = false;
}

when user wanna take screenshot, let toTakeScreenshot be true.