05/15/2024 15:19:45

Problem description

The move to launch the game login from WeChat fails. Quick login like QQ login is not realized

Cause of the problem

WeChat does not have the quick login ability. When a game is launched from WeChat (such as the Game Center, via shared message), it only carries openid but no other tokens, so it is a normal phenomenon to not directly log in successfully.

Solution

What should I do if I want to achieve quick login like QQ? Need to judge whether the game should be launched from WeChat. If the game needs to be launched from WeChat, the game needs to call the login interface Login ();

Fields for judging whether to launch the game from the platform side:

For MSDK5.2.000 and previous versions, judge by the game_data field in the ExtraJson parameter in wakeup callback. WeChat: WX_GameCenter; QQ: sq_gamecenter; For MSDK5.3.000 and later versions, judge by the param field in the ExtraJson parameter in wakeup callback. This field can receive all the fields returned by the platform. In addition, game_data can also receive the field, WeChat Android: _wxobject_message_ext: WX_GameCenter;WeChat iOS: messageExt:WX_GameCenter; QQ: launchfrom= sq_gamecenter.



Copyright © 2024 MSDK.
All rights reserved.

results matching ""

    No results matching ""