传送门:

Android新浪微博分享提示“21338:sso package or sign error”:
https://blog.csdn.net/pang787559613/article/details/106054257
Android
微信分享时提示“签名不对,请检查签名是否与开放平台上填写的一致。”:
https://blog.csdn.net/pang787559613/article/details/106023584

问题:新浪微博分享提示:“21322:redirect_uri_mismatch”

新浪微博分享提示“21322_redirect_uri_mismatch” - 图1

分析:

登录开放平台找找原因咯,在这里https://open.weibo.com/wiki/%E6%8E%88%E6%9D%83%E6%9C%BA%E5%88%B6%E8%AF%B4%E6%98%8E#.E5.8F.96.E6.B6.88.E6.8E.88.E6.9D.83.E5.9B.9E.E8.B0.83.E9.A1.B5能看到错误码:21322,错误描述是:重定向地址不匹配。
新浪微博分享提示“21322_redirect_uri_mismatch” - 图2
so也就有可能是开放平台的授权回调地址跟项目代码中配置的不一致,查看下,果然,没填写回调页。

解决:

开放平台中的授权回调地址跟项目中配置项redirect_url填写一样就行了。

那么,回调地址redirect_url(授权回调页)如何填写?

格式可以参考:http://open.weibo.com/apps/appKey/privilege/oauth

如:appKey=123456789

则授权回调页填写:http://open.weibo.com/apps/123456789/privilege/oauth
新浪微博分享提示“21322_redirect_uri_mismatch” - 图3
相应的项目中配置:redirect_url=http://open.weibo.com/apps/123456789/privilege/oauth
新浪微博分享提示“21322_redirect_uri_mismatch” - 图4

测试下:
https://api.weibo.com/oauth2/authorize?client_id=AppKey&redirect_uri=回调页网址

将上述AppKey、回调页网址替换成自己的,用浏览器打开则能看到如下图:
新浪微博分享提示“21322_redirect_uri_mismatch” - 图5