Lawbirth Posted October 29, 2019 Share Posted October 29, 2019 Hi,I'm trying to use FBInstant.ShareAsync from a game made with Unity.My function is ShareAsync: function (base64Picture, text) { var img = Pointer_stringify(base64Picture); FBInstant.shareAsync({ intent: 'REQUEST', image: img, text: Pointer_stringify(text), data: { myReplayData: '...' } }).then( function() { console.log("sharing is done"); }) .catch( function(err) { console.log('failed to share: ' + err.code + " :: " + err.message); }); } I can correctly see the image but no text appears, and I have three errors in the console repeating:"POST https://www.facebook.com/react_composer/logging/ods/?event=bootload_start&attachment_type=MEDIA 404".I've tried also with static string for both text and image, but nothing change.Any advice? Thanks in advance. Quote Link to comment Share on other sites More sharing options...
Noel Posted October 30, 2019 Share Posted October 30, 2019 Hi @Lawbirth What happens if you hardcode the text? I feel like the issue is with Pointer_stringify. Quote Link to comment Share on other sites More sharing options...
Lawbirth Posted October 30, 2019 Author Share Posted October 30, 2019 Hi @Noel, thank you for your reply. Unfortunately I've alredy tried with hardcoded text, but the result is the same. Pointer_stringify is necessary, according to https://docs.unity3d.com/Manual/webgl-interactingwithbrowserscripting.html , without this you obtain a pointer, which is not what is needed. Quote Link to comment Share on other sites More sharing options...
Noel Posted November 5, 2019 Share Posted November 5, 2019 @Lawbirth What I meant by hardcoding it was something like this: image: img, text: 'Test to see is the problem is with Pointer_stringify', data: { myReplayData: '...' } Quote Link to comment Share on other sites More sharing options...
Lawbirth Posted November 8, 2019 Author Share Posted November 8, 2019 @Noel Yes, sorry. Maybe I didn't explain myself correctly. I mean, I've tried with harcoded text. Also, when the text is not hardcoded, Pointer_stringify is necessary. Those are two separate tests. So hardcoded text, without Pointer_stringify, does not work as well. I've also noted, on iOS from messenger app and facebook app the text is showed correctly, so it doesn't work only on android and desktop browser. Quote Link to comment Share on other sites More sharing options...
Noel Posted November 11, 2019 Share Posted November 11, 2019 @Lawbirth You might want to ask this question to our dev community, maybe someone else had it before and solved it: https://www.facebook.com/groups/instantgamedevelopers/ Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.