getLikedTweets(for_fields_expansions_paginationToken_maxResults_) - daneden/Twift GitHub Wiki

getLikedTweets(for:fields:expansions:paginationToken:maxResults:)

Allows you to get information about a user’s liked Tweets.

public func getLikedTweets(for userId: User.ID,
                             fields: Set<Tweet.Field> = [],
                             expansions: [Tweet.Expansions] = [],
                             paginationToken: String? = nil,
                             maxResults: Int = 10
  )

Equivalent to GET /2/users/:id/liked_tweets

Parameters

  • userId: User ID of the user to request liked Tweets for.
  • fields: Any additional fields to include on returned objects
  • expansions: Objects and their corresponding fields that should be expanded in the includes property
  • paginationToken: This parameter is used to move forwards or backwards through 'pages' of results, based on the value of the next_token or previous_token in the response.
  • maxResults: Specifies the number of Tweets to try and retrieve, up to a maximum of 100 per distinct request. By default, 10 results are returned if this parameter is not supplied. The minimum permitted value is 10. It is possible to receive less than the max_results per request throughout the pagination process.

Returns

A response object containing an array of Tweets liked by the target User