Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Check Who I am following via Twitter4j

Is There anyway to check if I am following a certain user on Twitter other than getting the whole list of people who I am following and then start comparing Ids?

What I know is getting the whole list of people I am following is done through this method:

getFriendsIDs(long cursor) 
      Returns an array of numeric IDs for every user the authenticating user is following.
like image 376
Ahmed Emad Avatar asked Aug 26 '12 23:08

Ahmed Emad


1 Answers

You can use the showFriendship method to see if one user is following another. Call that method, which returns a Relationship object, which has methods to see if the two users specified are following each other.

like image 97
Bill the Lizard Avatar answered Nov 12 '22 11:11

Bill the Lizard