You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
attempting to use this function gives TypeError: get_oembed_tweet() takes 1 positional argument but 2 were given
example code to reproduce:
import urllib
x = twitter.get_user_timeline(screen_name='realdonaldtrump', count=1)
y = 'https://twitter.com/'+x[0]['user']['screen_name']+'/status/'+x[0]['id_str']
y = urllib.parse.quote_plus(y)
z = twitter.get_oembed_tweet(y)
attempting to use this function gives
TypeError: get_oembed_tweet() takes 1 positional argument but 2 were given
example code to reproduce:
Twitter API doc for this method here.
Twython assumes the wrong endpoint.
Correct endpoint is https://publish.twitter.com/oembed
and a properly constructed call for my example above should look like
The text was updated successfully, but these errors were encountered: