Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Andrew Chen
    @yongjhih
    This message was deleted
    This message was deleted
    D/RetroWeibo( 2035): uid:5644315971
    D/RetroWeibo( 2035): data:{"invite_logo":"https://raw.githubusercontent.com/8tory/SimpleWeibo/master/art/SimpleWeibo.png","text":"Andrew Chen: Yo SimpleWeibo!","url":"https://github.com/8tory/SimpleWeibo"}
    D/RetroWeibo( 2035): POST
    D/RetroWeibo( 2035): url: https://m.api.weibo.com/2/messages/invite.json
            JSONObject jsonObject = new JSONObject();
            try {
                jsonObject.put(InviteAPI.KEY_TEXT,        "这个游戏太好玩了,加入一起玩吧");
                jsonObject.put(InviteAPI.KEY_URL,         "http://app.sina.com.cn/appdetail.php?appID=770915");
                jsonObject.put(InviteAPI.KEY_INVITE_LOGO, "http://hubimage.com2us.com/hubweb/contents/123_499.jpg");
            } catch (JSONException e) {
                e.printStackTrace();
            }
    // ...
            new InviteAPI(this, Constants.APP_KEY, accessToken).sendInvite(uid, jsonObject, mInviteRequestListener);
    weibo-android-sdk/src/main/java/com/sina/weibo/sdk/openapi/InviteAPI.java:
        public void sendInvite(String uid, JSONObject jsonData, RequestListener listener) {
            if (!TextUtils.isEmpty(uid)
                    && jsonData != null
                    && !TextUtils.isEmpty(jsonData.toString())) {
    
                WeiboParameters params = new WeiboParameters(mAppKey);
                params.put("uid", uid);
                params.put("data", jsonData.toString());
                requestAsync(INVITE_URL, params, HTTPMETHOD_POST, listener);
            } else {
                LogUtil.d(TAG, "Invite args error!");
            }
        }
    D/RetroWeibo( 2035): uid:5644315971
    Andrew Chen
    @yongjhih
    上網查有人問官方 沒人答..
    This message was deleted
    This message was deleted
    This message was deleted
    Andrew Chen
    @yongjhih
    D/RetroWeibo( 2035): uid:5644315971
    D/RetroWeibo( 2035): data:{"invite_logo":"https://raw.githubusercontent.com/8tory/SimpleWeibo/master/art/SimpleWeibo.png","text":"Andrew Chen: Yo SimpleWeibo!","url":"https://github.com/8tory/SimpleWeibo"}
    D/RetroWeibo( 2035): POST
    D/RetroWeibo( 2035): url: https://m.api.weibo.com/2/messages/invite.json
    
    W/System.err( 2035): com.sina.weibo.sdk.exception.WeiboHttpException: {"error":"sender and receiver have no conversation!","error_code":26436,"request":"/2/messages/invite.json"}
    W/System.err( 2035):    at com.sina.weibo.sdk.net.HttpManager.requestHttpExecute(HttpManager.java:187)
    W/System.err( 2035):    at com.sina.weibo.sdk.net.HttpManager.openUrl(HttpManager.java:112)
    W/System.err( 2035):    at com.sina.weibo.sdk.net.AsyncWeiboRunner$RequestRunner.doInBackground(AsyncWeiboRunner.java:134)
    W/System.err( 2035):    at com.sina.weibo.sdk.net.AsyncWeiboRunner$RequestRunner.doInBackground(AsyncWeiboRunner.java:1)
    W/System.err( 2035):    at android.os.AsyncTask$2.call(AsyncTask.java:288)
    W/System.err( 2035):    at java.util.concurrent.FutureTask.run(FutureTask.java:237)
    W/System.err( 2035):    at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:231)
    W/System.err( 2035):    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
    W/System.err( 2035):    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
    W/System.err( 2035):    at java.lang.Thread.run(Thread.java:818)