绑群功能
一键绑群
通过调用Tencent类的gameBindGroup调用绑定群接口,参数如下:
Params: Bundle类型调用参数,必须包含的参数含义如下:
参数 | 是否必填 | 类型 | 参数说明 |
---|---|---|---|
GameAppOperation.GAME_UNION_ID | 是 | String | 公会ID |
GameAppOperation.GAME_ZONE_ID | 是 | String | 游戏区域ID |
GameAppOperation.GAME_UNION_NAME | 是 | String | 公会名称 |
GameAppOperation.GAME_ROLE_ID | 是 | String | 游戏角色ID |
GameAppOperation.GAME_APP_KEY | 是 | String | 与APPID对应,第三方申请 |
注意:和原来的加好友接口不同:需要传递参数GameAppOperation.GAME_SDK_VERSION
调用接口的示例代码如下:
mTencent = Tencent.createInstance(APPID, this); Bundle params = new Bundle(); params.putString(GameAppOperation.GAME_UNION_ID, unionid.getText().toString()); params.putString(GameAppOperation.GAME_ZONE_ID , zoneid.getText()); params.putString(GameAppOperation.GAME_UNION_NAME,union_name.getText()); params.putString(GameAppOperation.GAME_ROLE_ID, role_id.getText()); params.putString(GameAppOperation.GAME_APP_KEY, appkey.getText()); mTencent.gameBindGroup(this, params);
注意:CGI调用需要登录态!!!