Facebook plugin gameRequest() and login

Facebook plugin gameRequest() and login
0

Hello, I found unpleasant issue on iOS(I have not test it on Android yet).
I call

PluginFacebook::login();

And do successful login(via browser or native facebook app, does not matter), then I call

PluginFacebook::gameRequest("Invite Friends", "Join me");

And see dialog, that ask to login again.

Moreover this dialog don’t allow to use native facebook app to login, just offer to download it(link to App Store), like don’t see facebook app installed on the device.
It is very uncomfortable logic to type facebook login/password instead of login via facebook app.

This behaviour I tested on real devices with iOS 12.4.1 and 13.1. On the simulator I make first login via browser(only way) and then PluginFacebook::gameRequest(“Invite Friends”, “Join me”) don’t ask to login again, just show friends list to invite.

PS I tested this logic on “8 ball pool” game(according to https://www.cocos.com/en/about/ it made on cocos2dx too), and everything is ok: I make login via facebook app, then I invite friends without additional login.

1 Like

We can ask @yinjimmy

I used this tutorial https://developers.facebook.com/docs/games/services/gamerequests/ to code .

I tested and researched, so sorry I have not find a solution to invite friends without login again, even on iOS simulator 13/9.

@yinjimmy
I made some researches too(Facebook iOS SDK is open source), I figured out that login/shared processes use SFSafariView, on the other hand gameRequest(and it’s relogin) use WKWebView. Probably WKWebView does not see auth token(cookies?) from SFSafariView or something like this?

Thanks for your info.