微信 登录 Scope 参数错误或没有 Scope 权限
//電腦端 掃碼授權(quán)登錄
public static string AuthUrl = "https://open.weixin.qq.com/connect/qrconnect?appid={0}&redirect_uri={1}&response_type=code&scope=snsapi_login&state={2}#wechat_redirect";
?
//移動(dòng)端 直接授權(quán)登錄
public static string AuthUrl = "https://open.weixin.qq.com/connect/oauth2/authorize?appid={0}&redirect_uri={1}&response_type=code&scope=snsapi_login&state={2}#wechat_redirect";
?
//獲取?Token
public static string TokenRequestUrl = "https://api.weixin.qq.com/sns/oauth2/access_token?grant_type=authorization_code&appid={0}&secret={1}&code={2}";
?
//獲取 用戶信息
public static string GetUserInfoUrl = "https://api.weixin.qq.com/sns/userinfo?access_token={0}&openid={1}";
?
微信公眾號(hào)(公眾平臺(tái))?和?微信開放平臺(tái)?是兩碼事。
公眾號(hào)(公眾平臺(tái))獲取的scope只包括兩種:snsapi_base?和snsapi_userinfo,前者是靜默獲取,用戶無(wú)感知;后者是需要用戶確認(rèn)同意的。
微信開放平臺(tái)(https://open.weixin.qq.com/) ?用?scope=snsapi_login
? ? 本文轉(zhuǎn)自曾祥展博客園博客,原文鏈接:http://www.cnblogs.com/zengxiangzhan/p/7115994.html,如需轉(zhuǎn)載請(qǐng)自行聯(lián)系原作者
總結(jié)
以上是生活随笔為你收集整理的微信 登录 Scope 参数错误或没有 Scope 权限的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。
- 上一篇: rsync远程数据同步工具的使用
- 下一篇: XmlHttpRequest 对象详解