Help: How to Get Friends List of User (not self)

143 views
Skip to first unread message

Jim Gwilliam

unread,
Apr 7, 2016, 2:32:25 PM4/7/16
to python-twitter
I'm using Python3 on the spyder3 app in ubuntu.


I know I have authenticated using Oauth.

I am looking at this page for twitter-python 2.2: https://pypi.python.org/pypi/python-twitter/2.2

I'm trying to find a way to get the list of friends of a specific username.

I have verified that the example commands given in the help documentation work.  I have:

oauth = OAuth(token, token_key, con_secret, con_secret_key)
noauth = NoAuth()
    
t = Twitter(auth = oauth)


What would be the command to get the list of friends of a user, using the 3 lines I've placed above?
I can't seem to find any examples of that.

Thanks

bear

unread,
Apr 7, 2016, 2:42:22 PM4/7/16
to python-...@googlegroups.com
It looks like we have the Lookup Friendship endpoint:

LookupFriendship(user_id=None, screen_name=None)

but not the Show Friendship endpoint, so yea that would be a bug -
I've filed issue #317 to track this fix

https://github.com/bear/python-twitter/issues/317
> --
> You received this message because you are subscribed to the Google Groups
> "python-twitter" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to python-twitte...@googlegroups.com.
> To post to this group, send email to python-...@googlegroups.com.
> Visit this group at https://groups.google.com/group/python-twitter.
> For more options, visit https://groups.google.com/d/optout.



--
Bear

bea...@gmail.com (email)
be...@bear.im (xmpp, email)
http://bear.im

PGP Fingerprint = 9996 719F 973D B11B E111 D770 9331 E822 40B3 CD29

Jeremy Low

unread,
Apr 7, 2016, 2:46:26 PM4/7/16
to python-...@googlegroups.com
t.GetFriends(screen_name="jack") if you want all the people that user is following

t.GetFollowers(screen_name="jack") for all the people following that user. 




Jeremy Low

_____________________________
From: bear <bea...@gmail.com>
Sent: Thursday, April 7, 2016 2:42 PM
Subject: Re: Help: How to Get Friends List of User (not self)
To: <python-...@googlegroups.com>

bear

unread,
Apr 7, 2016, 11:11:27 PM4/7/16
to python-...@googlegroups.com
Oh, I read the question all wrong!

Well, I implemented the missing Friendship items in pull request #318
-- https://github.com/bear/python-twitter/pull/318

:)
Reply all
Reply to author
Forward
0 new messages