- 不管哪种方法 先导入Senparc.Weixin.MP.dll 官网有详细教程
- 第一种方法:
- //根据appId判断获取
- if (!AccessTokenContainer.CheckRegistered(appId))//检查是否已经注册
- {
- AccessTokenContainer.Register(appId, appSecret);//如果没有注册则进行注册
- }
- string access_token = AccessTokenContainer.GetAccessTokenResult(appId).access_token; //获取AccessToken结果
- 第二种方法:
- //根据appId、appSecret获取 (一步到位)
- string access_token = AccessTokenContainer.TryGetToken(appId, appSecret);
【access_token】获取access_token(Senparc.Weixin.MP.dll)
猜你喜欢
转载自blog.csdn.net/qq_36170585/article/details/68489838
今日推荐
周排行