Tos from Twitter:
Following/Not following Automated Actions: You may not follow or fail to follow Twitter accounts indiscriminately or in bulk. Aggressive stalking is a violation of the Twitter Rules. Review our Follower Rules and Best Practices to ensure compliance. Remember that apps that claim to gain more followers for users are also prohibited, according to the Twitter Rules.
Source (page end)
Never surprise the users. If your app tweets to a user or performs actions such as failing to follow, a user should start this - and not be surprised.
Source
Twitter considers it spam:
[...]
- whether you have followed and/or stopped following a large number of accounts in a short period, especially in an automated manner (following behavior aggressively or follower turnover);
- if you follow and fail to follow people repeatedly, either to create followers or to attract more attention to your profile;
[...]
- if you are following randomly or aggressively, bookmarking or retweeting Tweets;
[...]
- if you create misleading accounts or account interactions;
- if you sell or buy interactions with accounts (for example, sell or buy followers, retweets, favorites, etc.); and
- if you promote or use third-party services or apps that claim to garner more followers for you (such as follower trains,
sites that promise "more followers quickly" or any other
website that offers to automatically add followers to your website
account).
Source (page end)
Note that the terms can be changed frequently, the information contained here may not be updated accordingly, check the links to access the latest information. ;)
API Pública:
Oauth has an endpoint to follow other users, it is exactly:
https://api.twitter.com/1.1/friendships/create.json
According to the documentation:
Allows the authenticating users to follow the user specified in the ID Parameter.
This will be used to track other people, that you specify the ID, ie informing the person token X, that person X will follow the specified ID.
The question mentioned in the comments refers to how to log in using login/password, at least that was the question of this question, this is actually not possible using the Public API, for obvious reasons, this is explained there.
I think my question can help you https://answall.com/questions/208247/d%C3%Bavida-sobre-api-do-twitter? Rq=1
– user76271
I’ve seen, what I want to know, is how users follow, of course who authorize the application.
– Beatriz Mendonça
You can use this twitter API method https://dev.twitter.com/rest/reference/post/friendships/create
– gmsantos
@gmsantos, the problem is I don’t know how to use
JSON
withPHP
, so I asked for help with logic. If you have a simple answer but focus on the subject I will be grateful. I tried to make a method that would return theJSON
inarray
was unsuccessful.– Beatriz Mendonça
to manipulate JSON in PHP you can convert to array and vice versa. In short you will use json_encode and json_decode
– gmsantos
Grata will study, if I can post the answer.
– Beatriz Mendonça