1 Star 0 Fork 88

jiaomy / weixinHttpApi

forked from codeman35 / weixinHttpApi 
Create your Gitee Account
Explore and code with more than 6 million developers,Free private repositories !:)
Sign up
Clone or download
MainForm_Robot.cs 1.44 KB
Copy Edit Web IDE Raw Blame History
codeman35 authored 2016-01-05 19:16 . no commit message
using FluorineFx.Json;
using System;
using System.Collections;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.IO;
using System.IO.Compression;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Security.Cryptography;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading;
using System.Windows.Forms;
using System.Xml;
namespace WeiXinZhuaFaWang
{
public partial class MainForm : Form
{
/// <summary>
/// 远程调用小I 获取交谈内容
/// </summary>
/// <param name="msg"></param>
/// <returns></returns>
private string GetMSG(string msg, string yonghu)
{
try
{
var content = "";
using (WebClient wb = new WebClient())
{
wb.Encoding = Encoding.UTF8;
content = wb.DownloadString("http://www.tuling123.com/openapi/api?userid=" + yonghu + "&key=335d358c3d4e94fd0f8fd3e13dcd81e1&info=" +
msg
);
}
JavaScriptObject obj = JavaScriptConvert.DeserializeObject(content) as JavaScriptObject;
return obj["text"] + "";
}
catch
{
return "回答不了!";
}
}
}
}

Comment ( 0 )

Sign in for post a comment

C#
1
https://gitee.com/jiaomy/weixinHttpApi.git
git@gitee.com:jiaomy/weixinHttpApi.git
jiaomy
weixinHttpApi
weixinHttpApi
master

Search