DTcms.API/DTcms.API.OAuth/kaixin_helper.cs
(开头部分) 1KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using DTcms.Common;
using System;
using System.Collections.Generic;
namespace DTcms.API.OAuth
{
public class kaixin_helper
{
public static System.Collections.Generic.Dictionary<string, object> get_access_token(string code, string state)
{
oauth_config config = oauth_helper.get_config("kaixin");
string send_url = string.Concat(new string[]
{
"https://api.kaixin001.com/oauth2/access_token?grant_type=authorization_code&code=",
code,
"&client_id=",
config.oauth_app_id,
"&client_secret=",
config.oauth_app_key,
"&state=",
state,
"&redirect_uri=",
Utils.UrlEncode(config.return_uri)
});
string result = Utils.HttpGet(send_url);
System.Collections.Generic.Dictionary<string, object> result2;
if (result.Contains("error"))
{
result2 = null;
}
else
{
try
{
System.Collections.Generic.Dictionary<string, object> dic = JsonHelper.DataRowFromJSON(result);
if (dic.Count > 0)
{
result2 = dic;
return result2;
}
}
catch
{
result2 = null;
return result2;
}
result2 = null;
}
return result2;
}
public static System.Collections.Generic.Dictionary<string, object> get_info(string access_token, string fields)
{
string send_url = "https://api.kaixin001.com/users/me.json?fields=" + fields + "&access_token=" + access_token;
string result = Utils.HttpGet(send_url);
System.Collections.Generic.Dictionary<string, object> result2;
if (result.Contains("error"))
{
result2 = null;
}
后面还有 22 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。