EugeneBosyakov

Untitled

Aug 14th, 2012
133
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.75 KB | None | 0 0
  1. # Открыли браузер с авторизацией
  2. webbrowser.open_new_tab("http://oauth.vk.com/authorize?client_id=3077013&scope=messages&redirect_uri=http://oauth.vk.com/blank.html&display=page&response_type=token")
  3.  
  4. access_token = raw_input("access_token: ")
  5. expires_in = raw_input("expires_in: ")
  6. user_id = raw_input("user_id: ")
  7. print "Mission completed!"
  8.  
  9. print("Введите id пользователя")
  10. print("Узнать его можно из url'а профиля")
  11. id =  raw_input("Идентификатор пользователя: ")
  12.  
  13. # Достали последнее сообщение
  14. url = "https://api.vkontakte.ru/method/messages.getHistory.xml?uid=" + user_id + "&access_token=" + access_token + "&uid=" + id + "&count=1"
Advertisement
Add Comment
Please, Sign In to add comment