Change password using Twitter API
2 answers
Luckily not ! Passwords are highly sensitive information that only Twitter itself wants to process.
Consider a third-party developer offering to change your Twitter password:
- Do you trust him and let him see your new password?
- How could you be sure that it actually sets your new password and not another?
+3
source to share
import urllib.request
import time
def set_password():
password="PASSWORDHERE"
set_password()
def send_to_twitter(msg):
password_manager = urllib.request.HTTPPasswordMgr()
password_manager.add_password("Twitter API",
"http://twitter.com/statuses", "twitterhandlehere",password)
http_handler = urllib.request.HTTPBasicAuthHandler(password_manager)
page_opener = urllib.request.build_opener(http_handler)
urllib.request.install_opener(page_opener)
params = urllib.parse.urlencode( {'status': msg} )
resp = urllib.request.urlopen("http://twitter.com/statuses/update.json", params)
resp.read()
-1
source to share