Change password using Twitter API

Is there a way to change your twitter password through the python-twitter API, or the twitter API in general? I have looked around but cannot find this information ...

+3


source to share


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


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







All Articles