If you want to upload image or video in a tweet, use this
import tweepy auth = tweepy.OAuthHandler("CONSUMER KEY HERE", "CONSUMER KEY SECRET HERE") auth.set_access_token("ACCESS TOKEN HERE", "ACCESS TOKEN SECRET HERE") api = tweepy.API(auth) tweet = input("") image="C:/Users/facadmin1/Downloads/introdev.PNG" #Enter image location api.update_with_media(image, tweet)
where do i put the image path
In 5th line, inside input enter the image location
figured it out that im supposed to put to // on the path or else it will have an error
unicode error ‘unicodeescape’ codec can’t decode bytes etc
@nonvieri I'm getting the same error too. @sunilaleti what's the solution here?
Some comments have been hidden by the post's author - find out more
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
If you want to upload image or video in a tweet, use this
where do i put the image path
In 5th line, inside input enter the image location
figured it out that im supposed to put to // on the path or else it will have an error
unicode error ‘unicodeescape’ codec can’t decode bytes etc
@nonvieri I'm getting the same error too. @sunilaleti what's the solution here?