Advertisement
Guest User

Untitled

a guest
Apr 10th, 2018
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.51 KB | None | 0 0
  1. URL url = new URL("https://oauth.vk.com/token?grant_type=password&client_id=3697615&client_secret=AlVXZFMUqyrnABp8ncuU&username="+ URLEncoder.encode(String.valueOf(login), "utf-8")+"&password="+URLEncoder.encode(String.valueOf(password), "utf-8"));
  2. HttpURLConnection connection = (HttpURLConnection)url.openConnection();
  3. connection.setRequestMethod("GET");
  4. Toast.makeText(LoginActivity.this,
  5. connection.getResponseMessage(),
  6. Toast.LENGTH_SHORT).show();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement