Follow an user in twitter via Rest API
How using the twitter rest api can i follow a user in something like this format:
http://myuser:mypassword@urloftwitterapi/follow?user=useriwannafollow
There is a very simple开发者_Python百科 method like this? Thanks
As Joost already posted take a look at:
https://dev.twitter.com/docs/api/1/post/friendships/create
If you want to use this longer than till the end of June you'll need to check out OAuth Authentication:
https://dev.twitter.com/docs/auth/
https://dev.twitter.com/docs/auth/oauth/single-user-with-examples
Because Twitter will drop basic HTTP Auth by June 30th:
http://www.countdowntooauth.com/
That means you'll need some library by then, if you don't want to go with with something like Python or Ruby, you could check out Twurl: http://github.com/marcel/twurl/
Use friendships/create:
http://apiwiki.twitter.com/Twitter-REST-API-Method%3A-friendships%C2%A0create
精彩评论