Пример #1
0
        public static MMSnsPostRequest CreateSendTwitterRequestEntity(string sessionKey, uint uin, string deviceID, string OSType, string clientId, string DescriptionHtml)
        {
            BaseRequest @base = CreateBaseRequestEntity(deviceID, sessionKey, uin, OSType);

            MMSnsPostRequest.Builder builder = new MMSnsPostRequest.Builder();
            builder.SetBase(@base);
            SKBuiltinBuffer_t.Builder builder2 = new SKBuiltinBuffer_t.Builder();
            builder2.Buffer = ByteString.CopyFromUtf8(DescriptionHtml);
            builder2.ILen   = builder2.Buffer.Length;
            builder.SetObjectDesc(builder2);
            builder.Privacy       = 0;
            builder.SyncFlag      = 0;
            builder.ClientId      = clientId;
            builder.PostBGImgType = 0;
            builder.ObjectSource  = 0;
            return(builder.Build());
        }
Пример #2
0
        /// <summary>
        /// 发送朋友圈消息
        /// </summary>
        /// <param name="sessionKey"></param>
        /// <param name="uin"></param>
        /// <param name="deviceID"></param>
        /// <param name="OSType"></param>
        /// <param name="clientId"></param>
        /// <param name="DescriptionHtml"></param>
        /// <param name="desLen"></param>
        /// <returns></returns>
        public static MMSnsPostRequest CreateSendTwitterRequestEntity(string sessionKey, uint uin, string deviceID, string OSType, string clientId, string DescriptionHtml)
        {
            BaseRequest br = CreateBaseRequestEntity(deviceID, sessionKey, uin, OSType);

            MMSnsPostRequest.Builder mpr = new MMSnsPostRequest.Builder();
            mpr.SetBase(br);
            SKBuiltinBuffer_t.Builder sbr = new SKBuiltinBuffer_t.Builder();
            sbr.Buffer = (ByteString.CopyFromUtf8(DescriptionHtml));
            sbr.ILen   = sbr.Buffer.Length;
            mpr.SetObjectDesc(sbr);
            //mpr.WithUserListCount = 0;
            //mpr.MWithUserListCount = 0;
            mpr.Privacy       = 0;
            mpr.SyncFlag      = 0;
            mpr.ClientId      = clientId;
            mpr.PostBGImgType = 0;
            mpr.ObjectSource  = 0;
            return(mpr.Build());
        }