How can I get twitter list id from it?

I have a slug list like twitter.com/guidomb/iphone. I want to get the list id. How can i do this? I am using a Java application using Twitter4J, and the getUserListStatuses () method requires a list identifier, and I have a list. Is this a cool way to do this?

+3
source share
2 answers

I do not use twitter4j, but based on the Twitter API you can get the URL: http://api.twitter.com/1/guidomb/lists/iphone.json to get the list id.

I'm not sure why the function showUserList(java.lang.String listOwnerScreenName, int id)does not have a version for executing the string slug instead of the integer identifier, because in the Twitter API the id and slug are interchangeable and can be used to retrieve the Information list. http://dev.twitter.com/doc/get/:user/lists/:id

+1
source

getAllUserLists returns a list of UserLists, and you can get the list identifier from UserList # getId (). http://twitter4j.org/en/javadoc/twitter4j/Twitter.html#getAllUserLists(java.lang.String )

-1
source

Source: https://habr.com/ru/post/1786394/


All Articles