如果我使用链接,如何获取我的 accessToken:
https://www.facebook.com/login.php?skip_api_login=1&api_key=MY_APP_TOKEN&signed_next=1&next=https://www.facebook.com/dialog/oauth?redirect_uri=http%253A%252F%252Fwww.facebook.com%252Fconnect%252Flogin_success.html&scope=read_stream%252Coffline_access&type=user_agent&client_id=389735501155841&ret=login&cancel_uri=http://www.facebook.com/connect/login_success.html?error=access_denied&error_code=200&error_description=Permissions%2berror&error_reason=user_denied#_=_&display=page
我想在 Java 中获取令牌。
//编辑:
String GraphURL1 = "https://www.facebook.com/dialog/oauth?client_id=APPTOKEN&redirect_uri=https%3A%2F%2Fwww.facebook.com%2Fconnect%2Flogin_success.html&response_type=token&display=popup&scope=user_about_me%2Cread_stream%2C%20share_item";
URL newURL = new URL(GraphURL1);
HttpsURLConnection https = (HttpsURLConnection)newURL.openConnection();
https.setRequestMethod("HEAD");
https.setUseCaches(false);
//编辑:我已经保存了 token.txt 文件。代码是这样的: