vinitshahdeo / Quotter

:robot: A Twitter bot which tweets random quotes with image and #hashtags :bird: :bell:
https://vinitshahdeo.github.io/Quotter/
MIT License
37 stars 36 forks source link

Auto follower [Follow for Follow] #6

Open vinitshahdeo opened 5 years ago

vinitshahdeo commented 5 years ago

Add a feature to automatically follow any users that follow @Quotter

Please refer Twitter API

Note - Make only required changes and ensure that the existing functionality of code shouldn't break.

kousiksatish commented 5 years ago

I will work on this!

vinitshahdeo commented 5 years ago

@kousiksatish Yes, please go ahead!

kousiksatish commented 5 years ago

@vinitshahdeo Is it possible to do this using basic Twitter API. I am reading that twitter officially doesn't allow automated following / bulk following. https://follows.com/blog/2016/10/follow-twitter-back-automatically

kousiksatish commented 5 years ago

Just noticed this https://developer.twitter.com/en/docs/accounts-and-users/follow-search-get-users/api-reference/post-friendships-create . Will trying using this.

kousiksatish commented 5 years ago

@vinitshahdeo Should we

  1. use account activity API to subscribe to follow event webhooks and perform the follow back OR
  2. Execute a function in regular frequency to follow back users who have newly followed us.
kousiksatish commented 5 years ago

I have implemented a basic function for the second approach. This function will check followers and people who we are following and follow back someone whom we are not following already.

There are few tasks left to implement in this function