Skip to content

Commit 6899c77

Browse files
author
Nick Aiwazian
committed
Update codepath-oauth to allow scope
1 parent d77816c commit 6899c77

File tree

3 files changed

+3
-4
lines changed

3 files changed

+3
-4
lines changed

app/libs/codepath-oauth-0.4.1.jar

-8.32 KB
Binary file not shown.
Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
package com.codepath.instagram.helpers;
22

33
public class Constants {
4-
public static final String CLIENT_ID = "7f5321002cc04089b778e463cd87953f";
5-
public static final String CLIENT_SECRET = "a9980e6933814fd3848dba9f6b370b63";
64
public static final String REDIRECT_URI = "oauth://codepath.com";
5+
public static final String SCOPE = "comments";
76
}

app/src/main/java/com/codepath/instagram/networking/InstagramApi.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
public class InstagramApi extends DefaultApi20 {
1818

19-
private static final String URL = "https://api.instagram.com/oauth/authorize/?client_id=%s&redirect_uri=%s&response_type=code";
19+
private static final String URL = "https://api.instagram.com/oauth/authorize/?client_id=%s&redirect_uri=%s&response_type=code&scope=%s";
2020

2121
@Override
2222
public Verb getAccessTokenVerb() {
@@ -30,7 +30,7 @@ public String getAccessTokenEndpoint() {
3030

3131
@Override
3232
public String getAuthorizationUrl(OAuthConfig config) {
33-
return String.format(URL, config.getApiKey(), OAuthEncoder.encode(config.getCallback()));
33+
return String.format(URL, config.getApiKey(), OAuthEncoder.encode(config.getCallback()), config.getScope());
3434
}
3535

3636
@Override

0 commit comments

Comments
 (0)