-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Add WeChat API #739
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add WeChat API #739
Conversation
| parameters.add(WeChatConstants.STATE, state); | ||
| } | ||
|
|
||
| return parameters.appendTo(getAuthorizationBaseUrl()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pity. for single param name...
Maybe let it be like this:
final ParameterList parameters = new ParameterList(additionalParams);
parameters.add(WeChatConstants.CLIENT_ID, config.getApiKey());
return parameters.appendTo(super.getAuthorizationUrl(config, additionalParams));
or even
if (additionalParams==null) {
additionalParams = Collections.singletonMap(WeChatConstants.CLIENT_ID, config.getApiKey());
} else {
additionalParams.put(WeChatConstants.CLIENT_ID, config.getApiKey());
}
return super.getAuthorizationUrl(config, additionalParams);
| request.addParameter(WeChatConstants.CODE, code); | ||
| request.addParameter(WeChatConstants.GRANT_TYPE, WeChatConstants.AUTHORIZATION_CODE); | ||
|
|
||
| return request; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the same here.
final OAuthRequest request = super.createAccessTokenRequest(code);
request.addParameter...
return request;
|
|
||
| public WeChatToken(String accessToken, String openId, String unionId, String rawResponse) { | ||
| this(accessToken, null, null, null, null, openId, unionId, rawResponse); | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems we don't need this constructor. Constructor in GoogleToken as well.
|
Hi, And I need test user and app credentials to run the example before merging to the master. ps.Thanks! |
|
@kullfar |
|
Provided credentials aren't working (maybe they are outdated already?) |
|
There are problems with test user credentials. I have tried some times to register. No success. WeChat didn't send me the sms. |
|
Another test user account has been sent to you email, please try again. |
Support for Wechat Open Platform
see https://open.weixin.qq.com/cgi-bin/showdocument?action=dir_list&t=resource/res_list&verify=1&id=open1419316505&token=&lang=zh_CN