0

使用 facebook-android-sdk 4.8.1

我想使用 GameRequestContent API 向朋友发送游戏请求

 i have a real id for my friend ,then i call GameRequestContent a to send a game request

like this

GameRequestContent content = new GameRequestContent.Builder().setMessage("Come play this level with me")
                             .setData("hello")
                             .setRecipients(Arrays.asList("117157035316159"))
                             .setActionType(GameRequestContent.ActionType.SEND)
                             .setObjectId("117157035316159")
                             .build();
                     GameRequestDialog g = new GameRequestDialog(getActivity());
                     g.registerCallback(callbackManager, new FacebookCallback<GameRequestDialog.Result>() {
                         @Override
                         public void onSuccess(GameRequestDialog.Result o) {

                             Log.i("onSuccess", o.toString());
                         }

                         @Override
                         public void onCancel() {
                             Log.i("onSuccess", "onCancel");
                         }

                         @Override
                         public void onError(FacebookException error) {
                             Log.i("onError", error.getMessage());
                             error.printStackTrace();
                         }
                     });
                     g.show(content);

我已经尝试将用户名放入收件人中失败但是!对我的错误消息响应:{ httpResponseCode:-1,错误错误代码:2,facebookErrorType:null,消息:抱歉,此功能现在不可用:处理此请求时发生错误,请稍后再试(该功能不可用现在,处理请求时出现错误,请稍后再试)

我希望知道为什么~我该怎么办

4

0 回答 0