Monday, February 09, 2009

The Following/Followers dilemma on Twitter

I usually follow everyone that follows me on Twitter (except when it's clearly spam users), but there are a lot of people that use that nasty little trick to gain some followers: follow a lot of people and once those people follow them back, they stop following the people. This way, they can boost their ego (and maybe their dicks, I'm not sure) by showing off a huge difference between Following/Followers.

I don't really care about the number of followers that I have, but I do have to watch out for the amount of people that I follow, because an overcrowded timeline is useless since I don't have the time to read everything. And a good way to purge the Following list is to start by removing those "non-followers".

Since the Twitter web site doesn't allow having a cross-referenced view of the list of Following/Followers that would allow you to easily discover these "non-followers", I decided to make use of one of the available Java APIs for Twitter, Twitter4J, and create a small program that would give me that information.

So, if you're interested, download the JAR file here. You'll also need the Twitter4J JAR file: you can either download from the official website or you can download it from here.

To run the program, just type on a prompt terminal:

java -cp crossfollow.jar:twitter4j-1.1.4.jar dev.follow.twitter.CrossFollow username password

Just substitute username password with your data and you're ready to go. Also, you can run the program without providing the username and password, in which case, the program will prompt you for it.

Then, you'll get the list of the users that you follow that are not following you and for each user, the corresponding Twitter URL will be provided for you to then use as you pleased. The program does not change anything on your following or followers list. It simply provides the list as described above. It's up to you to perform the necessary changes directly on the Twitter website.

If this program gets successful, I might consider creating a real app for this, with a graphical user interface and all :-)

Any problems/questions/suggestions, please comment...

DISCLAIMER:
This software is distributed here freely and as open-source. It is done so as a means to ensure dissemination of technical work on a non-commercial basis. All rights therein are maintained by the author. It is understood that all persons downloading this software know that the software is provided AS IS and in no way the author is responsible for anything that may happen to your hardware and/or software on your computer or network. This software may not be re-distributed without the explicit permission of the author.

6 comments:

Carlos Martins said...

Considerando que esses dados (followers/following) são públicos, não haveria forma de o fazer sem necessidade de introduzir user/pass?

António Lopes said...

Bem visto. Vou ver se a API assim o permite.

Carlos Martins said...

Pelo menos nalguns sites de estatisticas, têm acesso ao número de followers... portanto, isso é garantido.
Quanto às suas identidades, é coisa que nunca explorei... Mas depois me dirás! :)

António Lopes said...

Já verifiquei e não dá. São limitações da API, só realizam operações para utilizadores autenticados.

Experimentei também com o JTwitter, a mesma limitação.

E até faz algum sentido, sendo APIs externas, é natural que eles queiram limitar os acessos anónimos, não porque a informação não seja pública, mas pelo simples facto de que assim conseguem reduzir o número de acessos diários aos servidores do Twitter.

E nós sabemos que eles bem precisam, porque quantas vezes não aparece a amiga baleia a voar :-)

Carlos Martins said...

... bem, valeu a pena tentar. :)

SEO services said...

Hi,
Great work done by author. I appreciate it. Thanks for sharing this informative post. Keep posting updates.