Skip to content

Add get_followers function to Twitter plugin#156

Merged
psmiratisu merged 2 commits intomainfrom
claude/add-follower-list-function-deB6d
Mar 6, 2026
Merged

Add get_followers function to Twitter plugin#156
psmiratisu merged 2 commits intomainfrom
claude/add-follower-list-function-deB6d

Conversation

@psmiratisu
Copy link
Copy Markdown
Contributor

Description

Adds a new get_followers function to the Twitter plugin that allows retrieving and analyzing a user's followers list.

Changes

  • Added getFollowersFunction getter method that creates a new GameFunction
  • Registers the function in the plugin's function list
  • The function accepts a user_id parameter and retrieves up to 100 followers with their public metrics and descriptions
  • Returns formatted follower data including username, name, description, follower count, and following count
  • Includes proper error handling and logging

Use Cases

  • Analyze a user's audience composition
  • Identify potential accounts to engage with
  • Support audience research and engagement strategies

Test Plan

Existing plugin tests should pass. The function follows the same pattern as other Twitter API functions in the plugin (postTweet, likeTweet, quoteTweet).

https://claude.ai/code/session_01KUvwzoZhwrUhv6Z2vt8ors

claude added 2 commits March 6, 2026 08:30
…ist by user ID

Adds a new `get_followers` GameFunction that retrieves up to 100 followers
for a given Twitter user ID, including public metrics and description.
The function is also added to the default worker functions list.

https://claude.ai/code/session_01KUvwzoZhwrUhv6Z2vt8ors
The followers API returns UserV2[] directly on .data, not nested under
.data.data. Also added explicit `any` type annotation for the map callback.

https://claude.ai/code/session_01KUvwzoZhwrUhv6Z2vt8ors
@github-actions github-actions Bot added the plugin Plugin contribution label Mar 6, 2026
@psmiratisu psmiratisu merged commit ca0cd01 into main Mar 6, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

plugin Plugin contribution

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants