コード例 #1
0
        /** {@inheritDoc} */
        public override void onHttpStatusOK(QQHttpResponse response)
        {
            QQSession session = getContext().getSession();

            JSONObject json = new JSONObject(response.getResponseString());

            if (json.getInt("retcode") == 0)
            {
                JSONObject obj = json.getJSONObject("result");
                session.setCfaceKey(obj.getString("gface_key"));
                session.setCfaceSig(obj.getString("gface_sig"));
                notifyActionEvent(QQActionEvent.Type.EVT_OK, session);
            }
            else
            {
                notifyActionEvent(QQActionEvent.Type.EVT_ERROR,
                                  new QQException(QQWpfApplication1.action.QQException.QQErrorCode.UNEXPECTED_RESPONSE, response.getResponseString()));
            }
        }