On Sun Aug 19 12:40:23 2012, njh@bandsman.co.uk wrote:
Show quoted text>
> Thank you for your reply. The problem with friends_ids() is that it
> takes a required argument (id), and I can't see anywhere in the
> documentation how to find out what my id is. I'm not saying it isn't
> documented, however I am saying I can't find it! An example would help.
Here's some more information on the deprecation of friends:
https://dev.twitter.com/docs/api/1/get/statuses/friends
You don't need an id argument unless you're getting someone else's friends. If you're getting
your own (those of the authenticated user), just pass a cursor:
my $r = $nt->friends_ids({ cursor => -1 });
If you're getting friends of someone else, you can pass their numeric ID or screen name:
my $r = $nt->friends_ids({ user_id => $numeric_twitter_id, cursor => -1 });
my $r = $nt->friends_ids({ screen_name => $screen_name, cursor => -1 });
Although, it isn't necessary to pass an id to get your own friends, it works. Passing your own
screen name has the same effect as not passing an id at all.
Hope that helps.
-Marc