How to test the twitter API locally?

前端 未结 7 1866
南笙
南笙 2021-02-05 09:34

I\'m trying to write a web application that would use Twitter via OAuth.

  1. I run my local server as \'localhost\', so I need the callback URL to be something like

7条回答
  •  梦谈多话
    2021-02-05 09:59

    Twitter's "rate limiting" for API GET calls is based on IP address of the caller. So, you can test your app from your server, using the same IP address, and get (once approved) 15,000 API calls per hour. That means you can pound on your app with many different usernames, as long as your approved IP address remains the same.

    When you send the e-mail to Twitter to ask for an increase to your rate limit, you can also ask for the increase to apply to your Twitter username too.

    I believe Twitter requires you - if you need to change your IP address, or change the username that is using the app - to send in another request asking for the rate limit increase for that new IP address or username. But, in my experience, Twitter has been pretty quick at turning around these requests (maybe less than 48 hours?).

提交回复
热议问题