How to test the twitter API locally?

前端 未结 7 1865
南笙
南笙 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 10:02

    1.) Don't use localhost. That's not helpful. Why not stand up another server instance or get a testing vm slice from slicehost?

    2.) You probably want a bunch of different user accounts and a couple different OAuth key/secret credentials for testing.

    You were on the right track though: DO test revoking the app's credentials via your twitter account's connections setting. That should happen gracefully. You might want to store a status value alongside the access token information, so you can mark tokens as revoked.

提交回复
热议问题