facebook / facebook-sdk-for-unity

The facebook sdk for unity.
https://developers.facebook.com/docs/unity
Other
489 stars 256 forks source link

FB.AppRequest callback returns cancelled for the first 2 times [iOS Only] #499

Open shmulious opened 3 years ago

shmulious commented 3 years ago

Hi all! I've been looking for a similar issue but couldn't find anything like that.

Environment Unity: 2018.4.20f1 Unity Facebook SDK version: 8.1.0 Platform: iOS

I'm trying to send a gift to a facebook friend, using FB.AppRequest. It opens a facebook dialog on a browser. I hit send, and it automatically opens my app. the problem is - this is what I get as a response (RawResult): {"callback_id":"4","cancelled":"true"} Of course, I didn't hit the cancel button.

It happens 2 times and then the 3rd time succeeds with the valid response of: {"callback_id":"6","to":["some_valid_fb_id"],"to[0]":"some_valid_fb_id","request":"some_valid_fb_request_id","didComplete":true}

Did anyone encounter such issue? How can I solve it? Am I Doing something wrong?

rankorn commented 3 years ago

I am getting the same behavior with: Unity 2019.4.16 Facebook SDK 8.1.1 iOS platform

Result from facebook is: {"callback_id":"3","cancelled":"true"} The id is changing of course on every try.

Also opened a bug: https://developers.facebook.com/support/bugs/527149638210097/

btmorgan commented 3 years ago

We are experiencing the same issue with:

Unity 2019.4.13f Facebook SDK 9.0.0 iOS Platform

All calls to FB.AppRequest are being opened in a web view. Upon returning to our application, we always get a "cancelled" result.

gtino commented 3 years ago

Seems to be happening again all of a sudden with:

Unity 2020.3.6f1 Facebook SDK 9.2.0 iOS Platform

All calls to FB.AppRequest are being opened in a web view. Upon returning to our application, we always get a "cancelled" result.

This happens EVERY time not just the first two!

Android instead seems to work fine.

paradizIscool commented 3 years ago

Getting the same issue after updating from 8.1.1 to 9.2.0.

Has anyone managed to fix this problem?