Giter Site home page Giter Site logo

Comments (7)

JessicaGarson avatar JessicaGarson commented on August 18, 2024 2

I think this has to do with some settings on our end, and I know this code worked for some users. I'm still working on getting to the bottom of it, but I'll let you know if I hear of anything. Also worth noting that we've made some auth changes since that page was initially created.

from twitter-api-v2-sample-code.

timborden avatar timborden commented on August 18, 2024

Nice find!

I needed to add an extra x_auth_access_type query parameter to get write access:

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

Source: https://developer.twitter.com/en/docs/authentication/api-reference/request_token

from twitter-api-v2-sample-code.

zmoon avatar zmoon commented on August 18, 2024

@timborden good to know. I guess I didn't need that because I changed my OAuth settings in Developer Portal from the default read to read/write?

from twitter-api-v2-sample-code.

JessicaGarson avatar JessicaGarson commented on August 18, 2024

Thanks, @zmoon @timborden, for your feedback. I'm looking into this and will make some changes here if needed.

from twitter-api-v2-sample-code.

JessicaGarson avatar JessicaGarson commented on August 18, 2024

All versions of this code work for me, but I'm going to go ahead and update all the samples with https://api.twitter.com/oauth/request_token?oauth_callback=oob&x_auth_access_type=write. Thank you for this feedback.

from twitter-api-v2-sample-code.

zmoon avatar zmoon commented on August 18, 2024

@JessicaGarson any idea why oauth_callback=oob wasn't needed for you? This page makes it sound like it is always needed in this situation.

If you are using pin-based authorization, you will need to set this to oob.

from twitter-api-v2-sample-code.

JessicaGarson avatar JessicaGarson commented on August 18, 2024

I'm going to close out this issue since these issues have been resolved.

from twitter-api-v2-sample-code.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.