Skip to content

Commit c39a110

Browse files
committed
Already have a URI
1 parent d082073 commit c39a110

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/examples/java/com/soundcloud/api/examples/FacebookConnect.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,9 @@ public static void main(String[] args) throws IOException {
4141
null /* token */,
4242
Env.SANDBOX);
4343

44-
45-
String url = wrapper.authorizationCodeUrl(Endpoints.FACEBOOK_CONNECT, Token.SCOPE_NON_EXPIRING).toString();
44+
URI url = wrapper.authorizationCodeUrl(Endpoints.FACEBOOK_CONNECT, Token.SCOPE_NON_EXPIRING);
4645
if (Desktop.isDesktopSupported() && Desktop.getDesktop().isSupported(Desktop.Action.BROWSE)) {
47-
Desktop.getDesktop().browse(URI.create(url));
46+
Desktop.getDesktop().browse(url);
4847
} else {
4948
System.err.println("open \"" + url + "\" in a browser");
5049
}

0 commit comments

Comments
 (0)