Twitter API authorization fails CORS preflight in browser

前端 未结 4 1498
说谎
说谎 2020-11-29 09:55

I\'m trying to do the 3-legged authorization necessary to call the Twitter APIs in a browser. The process starts with getting a request token by POSTing a signed request to

4条回答
  •  悲&欢浪女
    2020-11-29 10:33

    A workaround and it is a long way around is to build a proxy server that you run with node or something else, I've done this a few times now, this is a good starter repo for someone running into this issue. It has the downside of being React specific, but you could always rip out the react ui and just setup with whatever you need: hcra twitter build.

    Its forked from a Create React App/Node Express boilerplate by Mars Hall

    You will need to clone it and run git fetch and then checkout twitter-req branch.

提交回复
热议问题