我如何使用 twitter rest api 以如下格式关注用户:
http://myuser:mypassword@urloftwitterapi/follow?user=useriwannafollow
有这样一个非常简单的方法吗? 感谢
最佳答案
由于 Joost 已经发布,请查看:
https://dev.twitter.com/docs/api/1/post/friendships/create
如果您想在 6 月底之前使用它,您需要查看 OAuth 身份验证:
https://dev.twitter.com/docs/auth/
https://dev.twitter.com/docs/auth/oauth/single-user-with-examples
因为 Twitter 将在 6 月 30 日之前放弃基本的 HTTP 身份验证:
http://www.countdowntooauth.com/
这意味着到那时你将需要一些库,如果你不想使用 Python 或 Ruby 之类的东西,你可以查看 Twurl:http://github.com/marcel/twurl/
关于api - 通过 Rest API 在 twitter 上关注用户,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2707209/