File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1718,3 +1718,26 @@ export async function getQuoteTweetsV2(
17181718 ...defaultOptions ,
17191719 } ) ;
17201720}
1721+
1722+ /**
1723+ * Fetch tweets liked by a specific user using the v2 API.
1724+ * @param userId The user ID whose liked tweets should be returned.
1725+ * @param maxResults The maximum number of results to return per request.
1726+ * @param auth The authentication object.
1727+ * @returns A promise that resolves to a paginator of liked tweets.
1728+ */
1729+ export async function getUserLikedTweetsV2 (
1730+ userId : string ,
1731+ maxResults : number ,
1732+ auth : TwitterAuth ,
1733+ ) : Promise < TweetV2UserLikedTweetsPaginator > {
1734+ const client = auth . getV2Client ( ) ;
1735+ if ( ! client ) {
1736+ throw new Error ( 'Twitter v2 client is not initialized.' ) ;
1737+ }
1738+
1739+ return await client . v2 . userLikedTweets ( userId , {
1740+ max_results : maxResults ,
1741+ ...defaultOptions ,
1742+ } ) ;
1743+ }
You can’t perform that action at this time.
0 commit comments