Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
checkstyle
  • Loading branch information
wangshengguo committed Feb 10, 2017
commit e6a6ecd53d0a2784e5f539051412a71f13c77859
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ private WeChat20Example() {

public static void main(String... args) throws IOException, InterruptedException, ExecutionException {
// Replace these with your own api key and secret
final String apiKey = "your_appid";;
final String apiKey = "your_appid";
final String apiSecret = "your_secret";
final OAuth20Service service = new ServiceBuilder()
.apiKey(apiKey)
Expand Down Expand Up @@ -61,7 +61,7 @@ public static void main(String... args) throws IOException, InterruptedException
System.out.println("Now we're going to access a protected resource...");

final OAuthRequest request = new OAuthRequest(Verb.GET, PROTECTED_RESOURCE_URL);
request.addQuerystringParameter(WeChatConstants.OPEN_ID, ((WeChatToken)accessToken).getOpenId());
request.addQuerystringParameter(WeChatConstants.OPEN_ID, ((WeChatToken) accessToken).getOpenId());
request.addQuerystringParameter(WeChatConstants.LANG, "zh_CN");

service.signRequest(accessToken, request);
Expand Down