I am trying to make authorization through 4kkvar and at the moment when I have to redirect this page to confirm authorization I just get back the html of the page to which I should be redirected. How do I get to that page from the code?
public void authenticate() throws IOException { String url = "https://foursquare.com/oauth2/authenticate?response_type=code&redirect_uri=http://localhost:8080/4sqr/callback_url&client_id=1DUHD3H1DGL5*********NFSLRDLR"; HttpClient httpClient = HttpClientBuilder.create().build(); HttpPost post = new HttpPost(url); HttpResponse response = httpClient.execute(post); HttpEntity entity = response.getEntity(); String content = EntityUtils.toString(entity); // здесь просто html той страницы на которую должно было бы перекинуть System.out.println(content); }