xdevplatform / Twitter-API-v2-sample-code

Sample code for the Twitter API v2 endpoints
https://developer.twitter.com/en/docs/twitter-api/getting-started/about-twitter-api
Apache License 2.0
2.69k stars 993 forks source link

delete_tweet.py provides an authorization link that doesn't return the authorization PIN #100

Open numbworks opened 2 years ago

numbworks commented 2 years ago

Problem: "delete_tweet.py" provides an authorization link that doesn't return the authorization PIN.

I do refer to the following block in the log after running the script:

...
Please go here and authorize: https://api.twitter.com/oauth/authorize?oauth_token=<token>
Paste the PIN here: <pin>
...

Solution: As for "create_tweet.py", replacing the following line:

request_token_url = "https://api.twitter.com/oauth/request_token"

with the following:

request_token_url = "https://api.twitter.com/oauth/request_token?oauth_callback=oob&x_auth_access_type=write"

to fix the issue.

Please update the file in the repository accordingly.

mowsie2k commented 1 year ago

Oh man, this literally just saved my life. Issue still persists. I thought oath_callback=oob was supposed to be the default?

mowsie2k commented 1 year ago

Oh man, this literally just saved my life. Issue still persists. I thought oath_callback=oob was supposed to be the default?

mowsie2k commented 1 year ago

Oh man, this literally just saved my life. Issue still persists. I thought oath_callback=oob was supposed to be the default?

mowsie2k commented 1 year ago

Oh man, this literally just saved my life. Issue still persists. I thought oath_callback=oob was supposed to be the default?

numbworks commented 1 year ago

@mowsie2k You are welcome! ☺️