lookupFollowings abstract method
Returns a list of users the specified user ID is following.
The value returned when the paging
callback is specified is
the first object obtained that started the paging process. The value
obtained in the paging process is passed to the paging
callback
function as a PagingEvent
object.
Parameters
-
userId
: The user ID whose following you would like to retrieve. -
maxResults
: The maximum number of results to be returned per page. This can be a number between 1 and the 1000. By default, each page will return 100 results. -
paginationToken
: Used to request the next page of results if all results weren't returned with the latest request, or to go back to the previous page of results. To return the next page, pass thenext_token
returned in your previous response. To go back one page, pass theprevious_token
returned in your previous response. -
expansions
: Expansions enable you to request additional data objects that relate to the originally returned users. -
tweetFields
: This fields parameter enables you to select which specific Tweet fields will deliver in each returned pinned Tweet. The Tweet fields will only return if the user has a pinned Tweet and if you've also included theexpansions=pinned_tweet_id
query parameter in your request. While the referenced Tweet ID will be located in the original Tweet object, you will find this ID and all additional Tweet fields in the includes data object. -
userFields
: This fields parameter enables you to select which specific user fields will deliver with each returned users objects. These specified user fields will display directly in the user data objects. -
paging
: If this callback function is specified, paging is performed continuously until certain conditions are met. This paging function is bi-directional, both forward and backward, and allows for safe paging. The response and other metadata obtained when paging is performed is passed to the callback function asPagingEvent
object. So you can get the result of paging fromPagingEvent
object. Also, the direction and continuity of paging can be controlled by returningPaginationControl
object in thepaging
callback function. Please usePaginationControl.forward()
to continue paging and move forward, or usePaginationControl.backward()
to move backward. And be sure to returnPaginationControl.stop()
to terminate paging on arbitrary conditions, otherwise paging continues until the next page runs out.
Endpoint Url
Authentication Methods
- OAuth 2.0 Authorization Code with PKCE
- OAuth 2.0 App-only
- OAuth 1.0a
Required Scopes
- tweet.read
- users.read
- follows.read
Rate Limits
-
**App rate limit (OAuth 2.0 App Access Token): 15 requests per 15-minute window shared among all users of your app
-
User rate limit (OAuth 2.0 user Access Token): 15 requests per 15-minute window per each authenticated user
Reference
Implementation
Future<TwitterResponse<List<UserData>, UserMeta>> lookupFollowings({
required String userId,
int? maxResults,
String? paginationToken,
List<UserExpansion>? expansions,
List<TweetField>? tweetFields,
List<UserField>? userFields,
Paging<List<UserData>, UserMeta>? paging,
});