hi
i want to redirect twitch/tv homepage after log in
here is my code
(i already fill the ID and client_id)
when i click the button, local page show the JSON response about my id, display name, etc…
i want to redirect twitch/tv homepage as signed in
how could i do??
I don’t know webdriver. But sounds like you are doing it wrong/expecting something else to happen. Does webdriver just display the page in order for the user to login?
under oAuth you are supposed to direct a user to the authorize url, where a User then logins and grants your client access to their account, that then GET’s back to your return url which then does the oAuth code dance to exchange for a token.
@BarryCarlyon it’s part of selenium, which is a web browser automation library.
@_Kim the user needs to actually open the first authorization URL in their browser, login if they haven’t yet, and authorize the application. Selenium is not what you need here. If it’s a desktop application you’re creating, you’ll want to open the URL using the user’s default browser. If it’s a web server backend application, you’ll want to redirect the user to that URL.
public class login_test {
public static void main(String args[]) throws Exception {
// Create Desktop object
Desktop d = Desktop.getDesktop();
// Browse a URL, say google.com
d.browse(new URI("https://google.com/"));
d.browse(new URI("http://twitch.tv/"));
Document doc = Jsoup.connect(URL).get() <--it's not work
System.out.println(doc);
}
}
l don’t know exactly but it automatically signed in the page(http://twitch.tv/)
In this moment, i have another question
after signed in the page how to i get the page source??
i want it to get some page source(like HTML code for page)<=