@elizaos/plugin-twitter 1.0.13 โ 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +277 -133
- package/dist/index.d.ts +102 -169
- package/dist/index.js +588 -1261
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,36 +1,166 @@
|
|
|
1
1
|
# Eliza Twitter/X Client
|
|
2
2
|
|
|
3
|
-
This package provides Twitter/X integration for the Eliza AI agent using Twitter API v2.
|
|
3
|
+
This package provides Twitter/X integration for the Eliza AI agent using the official Twitter API v2.
|
|
4
|
+
|
|
5
|
+
## ๐จ TL;DR - Quick Setup
|
|
6
|
+
|
|
7
|
+
**Just want your bot to post tweets? Here's the fastest path:**
|
|
8
|
+
|
|
9
|
+
1. **Get Twitter Developer account** โ https://developer.twitter.com
|
|
10
|
+
2. **Create an app** โ Enable "Read and write" permissions
|
|
11
|
+
3. **Get OAuth 1.0a credentials** (NOT OAuth 2.0!):
|
|
12
|
+
- API Key & Secret (from "Consumer Keys")
|
|
13
|
+
- Access Token & Secret (from "Authentication Tokens")
|
|
14
|
+
4. **Add to `.env`:**
|
|
15
|
+
```bash
|
|
16
|
+
TWITTER_API_KEY=xxx
|
|
17
|
+
TWITTER_API_SECRET_KEY=xxx
|
|
18
|
+
TWITTER_ACCESS_TOKEN=xxx
|
|
19
|
+
TWITTER_ACCESS_TOKEN_SECRET=xxx
|
|
20
|
+
TWITTER_POST_ENABLE=true
|
|
21
|
+
TWITTER_POST_IMMEDIATELY=true
|
|
22
|
+
```
|
|
23
|
+
5. **Run:** `bun start`
|
|
24
|
+
|
|
25
|
+
โ ๏ธ **Common mistake:** Using OAuth 2.0 credentials instead of OAuth 1.0a - see [Step 3](#step-3-get-the-right-credentials-oauth-10a) for details!
|
|
4
26
|
|
|
5
27
|
## Features
|
|
6
28
|
|
|
7
|
-
- Autonomous tweet posting with configurable intervals
|
|
8
|
-
- Timeline monitoring and interaction
|
|
9
|
-
- Mention and reply handling
|
|
10
|
-
- Search functionality
|
|
11
|
-
- Direct message support
|
|
12
|
-
- Advanced timeline algorithms with weighted scoring
|
|
13
|
-
-
|
|
14
|
-
-
|
|
29
|
+
- โ
**Autonomous tweet posting** with configurable intervals
|
|
30
|
+
- โ
**Timeline monitoring** and interaction
|
|
31
|
+
- โ
**Mention and reply handling**
|
|
32
|
+
- โ
**Search functionality**
|
|
33
|
+
- โ
**Direct message support**
|
|
34
|
+
- โ
**Advanced timeline algorithms** with weighted scoring
|
|
35
|
+
- โ
**Comprehensive caching system**
|
|
36
|
+
- โ
**Built-in rate limiting and retry mechanisms**
|
|
15
37
|
|
|
16
|
-
##
|
|
17
|
-
|
|
18
|
-
### Prerequisites
|
|
38
|
+
## Prerequisites
|
|
19
39
|
|
|
20
40
|
- Twitter Developer Account with API v2 access
|
|
21
|
-
- Twitter
|
|
41
|
+
- Twitter OAuth 1.0a credentials (NOT OAuth 2.0)
|
|
22
42
|
- Node.js and bun installed
|
|
23
43
|
|
|
24
|
-
|
|
44
|
+
## ๐ Quick Start
|
|
45
|
+
|
|
46
|
+
### Step 1: Get Twitter Developer Access
|
|
47
|
+
|
|
48
|
+
1. Apply for a developer account at https://developer.twitter.com
|
|
49
|
+
2. Create a new app in the [Developer Portal](https://developer.twitter.com/en/portal/projects-and-apps)
|
|
50
|
+
3. Ensure your app has API v2 access
|
|
51
|
+
|
|
52
|
+
### Step 2: Configure App Permissions for Posting
|
|
53
|
+
|
|
54
|
+
**โ ๏ธ CRITICAL: Default apps can only READ. You must enable WRITE permissions to post tweets!**
|
|
55
|
+
|
|
56
|
+
1. In your app settings, go to **"User authentication settings"**
|
|
57
|
+
2. Configure exactly as shown:
|
|
58
|
+
|
|
59
|
+
**App permissions**: `Read and write` โ
|
|
60
|
+
|
|
61
|
+
**Type of App**: `Web App, Automated App or Bot`
|
|
62
|
+
|
|
63
|
+
**Required URLs** (copy these exactly):
|
|
64
|
+
```
|
|
65
|
+
Callback URI: http://localhost:3000/callback
|
|
66
|
+
Website URL: https://github.com/elizaos/eliza
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
**Optional fields**:
|
|
70
|
+
```
|
|
71
|
+
Organization name: ElizaOS
|
|
72
|
+
Organization URL: https://github.com/elizaos/eliza
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
3. Click **Save**
|
|
76
|
+
|
|
77
|
+
### Step 3: Get the RIGHT Credentials (OAuth 1.0a)
|
|
78
|
+
|
|
79
|
+
**โ ๏ธ IMPORTANT: You need OAuth 1.0a credentials, NOT OAuth 2.0!**
|
|
80
|
+
|
|
81
|
+
In your app's **"Keys and tokens"** page, you'll see several sections. Here's what to use:
|
|
82
|
+
|
|
83
|
+
```
|
|
84
|
+
โ
USE THESE (OAuth 1.0a):
|
|
85
|
+
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
|
86
|
+
โ Consumer Keys โ
|
|
87
|
+
โ โโ API Key: xxx...xxx โ TWITTER_API_KEY โ
|
|
88
|
+
โ โโ API Key Secret: xxx...xxx โ TWITTER_API_SECRET_KEY โ
|
|
89
|
+
โ โ
|
|
90
|
+
โ Authentication Tokens โ
|
|
91
|
+
โ โโ Access Token: xxx...xxx โ TWITTER_ACCESS_TOKEN โ
|
|
92
|
+
โ โโ Access Token Secret: xxx โ TWITTER_ACCESS_TOKEN_SECRET โ
|
|
93
|
+
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
|
94
|
+
|
|
95
|
+
โ DO NOT USE THESE (OAuth 2.0):
|
|
96
|
+
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
|
97
|
+
โ OAuth 2.0 Client ID and Client Secret โ
|
|
98
|
+
โ โโ Client ID: xxx...xxx โ IGNORE โ
|
|
99
|
+
โ โโ Client Secret: xxx...xxx โ IGNORE โ
|
|
100
|
+
โ โ
|
|
101
|
+
โ Bearer Token โ IGNORE โ
|
|
102
|
+
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
**After enabling write permissions, you MUST:**
|
|
106
|
+
1. Click **"Regenerate"** on Access Token & Secret
|
|
107
|
+
2. Copy the NEW tokens (old ones won't have write access)
|
|
108
|
+
3. Look for "Created with Read and Write permissions" โ
|
|
109
|
+
|
|
110
|
+
### Step 4: Configure Environment Variables
|
|
25
111
|
|
|
26
112
|
Create or edit `.env` file in your project root:
|
|
27
113
|
|
|
28
114
|
```bash
|
|
29
|
-
#
|
|
30
|
-
TWITTER_API_KEY= #
|
|
31
|
-
TWITTER_API_SECRET_KEY=
|
|
32
|
-
|
|
33
|
-
|
|
115
|
+
# REQUIRED: OAuth 1.0a Credentials (from "Consumer Keys" section)
|
|
116
|
+
TWITTER_API_KEY=your_api_key_here # From "API Key"
|
|
117
|
+
TWITTER_API_SECRET_KEY=your_api_key_secret_here # From "API Key Secret"
|
|
118
|
+
|
|
119
|
+
# REQUIRED: OAuth 1.0a Tokens (from "Authentication Tokens" section)
|
|
120
|
+
TWITTER_ACCESS_TOKEN=your_access_token_here # Must have "Read and Write"
|
|
121
|
+
TWITTER_ACCESS_TOKEN_SECRET=your_token_secret_here # Regenerate after permission change
|
|
122
|
+
|
|
123
|
+
# Basic Configuration
|
|
124
|
+
TWITTER_DRY_RUN=false # Set to true to test without posting
|
|
125
|
+
TWITTER_POST_ENABLE=true # Set to true to enable auto-posting
|
|
126
|
+
|
|
127
|
+
# Optional: Posting Configuration
|
|
128
|
+
TWITTER_POST_IMMEDIATELY=true # Post on startup (great for testing)
|
|
129
|
+
TWITTER_POST_INTERVAL_MIN=90 # Minimum minutes between posts
|
|
130
|
+
TWITTER_POST_INTERVAL_MAX=180 # Maximum minutes between posts
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
### Step 5: Run Your Bot
|
|
134
|
+
|
|
135
|
+
```typescript
|
|
136
|
+
// Your character should include the twitter plugin
|
|
137
|
+
const character = {
|
|
138
|
+
// ... other config
|
|
139
|
+
plugins: [
|
|
140
|
+
"@elizaos/plugin-bootstrap", // Required for content generation
|
|
141
|
+
"@elizaos/plugin-twitter" // Twitter functionality
|
|
142
|
+
],
|
|
143
|
+
postExamples: [ // Examples for tweet generation
|
|
144
|
+
"Just discovered an amazing pattern in the data...",
|
|
145
|
+
"The future of AI is collaborative intelligence",
|
|
146
|
+
// ... more examples
|
|
147
|
+
]
|
|
148
|
+
};
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
Then start your bot:
|
|
152
|
+
```bash
|
|
153
|
+
bun run start
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
## ๐ Complete Configuration Reference
|
|
157
|
+
|
|
158
|
+
```bash
|
|
159
|
+
# Required Twitter API v2 Credentials (OAuth 1.0a)
|
|
160
|
+
TWITTER_API_KEY= # Consumer API Key
|
|
161
|
+
TWITTER_API_SECRET_KEY= # Consumer API Secret
|
|
162
|
+
TWITTER_ACCESS_TOKEN= # Access Token (with write permissions)
|
|
163
|
+
TWITTER_ACCESS_TOKEN_SECRET= # Access Token Secret
|
|
34
164
|
|
|
35
165
|
# Basic Configuration
|
|
36
166
|
TWITTER_DRY_RUN=false # Set to true for testing without posting
|
|
@@ -42,7 +172,7 @@ TWITTER_POLL_INTERVAL=120 # Timeline polling interval (seconds)
|
|
|
42
172
|
TWITTER_POST_ENABLE=false # Enable autonomous tweet posting
|
|
43
173
|
TWITTER_POST_INTERVAL_MIN=90 # Minimum interval between posts (minutes)
|
|
44
174
|
TWITTER_POST_INTERVAL_MAX=180 # Maximum interval between posts (minutes)
|
|
45
|
-
TWITTER_POST_IMMEDIATELY=false #
|
|
175
|
+
TWITTER_POST_IMMEDIATELY=false # Post immediately on startup
|
|
46
176
|
TWITTER_POST_INTERVAL_VARIANCE=0.2 # Random variance factor for posting intervals
|
|
47
177
|
|
|
48
178
|
# Interaction Settings
|
|
@@ -67,81 +197,98 @@ TWITTER_ENABLE_ACTION_PROCESSING=false # Enable timeline action processing
|
|
|
67
197
|
TWITTER_ACTION_INTERVAL=240 # Action processing interval (minutes)
|
|
68
198
|
```
|
|
69
199
|
|
|
70
|
-
|
|
200
|
+
## ๐ฏ Common Use Cases
|
|
71
201
|
|
|
72
|
-
|
|
73
|
-
import { TwitterClientInterface } from "@elizaos/plugin-twitter";
|
|
202
|
+
### Just Want to Post Tweets?
|
|
74
203
|
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
204
|
+
```bash
|
|
205
|
+
# Minimal setup for posting only
|
|
206
|
+
TWITTER_API_KEY=xxx
|
|
207
|
+
TWITTER_API_SECRET_KEY=xxx
|
|
208
|
+
TWITTER_ACCESS_TOKEN=xxx # Must have write permissions!
|
|
209
|
+
TWITTER_ACCESS_TOKEN_SECRET=xxx
|
|
210
|
+
|
|
211
|
+
TWITTER_POST_ENABLE=true
|
|
212
|
+
TWITTER_POST_IMMEDIATELY=true # Great for testing
|
|
213
|
+
TWITTER_SEARCH_ENABLE=false # Disable interactions
|
|
214
|
+
```
|
|
215
|
+
|
|
216
|
+
### Want Full Interaction Bot?
|
|
80
217
|
|
|
81
|
-
|
|
82
|
-
|
|
218
|
+
```bash
|
|
219
|
+
# Full interaction setup
|
|
220
|
+
TWITTER_API_KEY=xxx
|
|
221
|
+
TWITTER_API_SECRET_KEY=xxx
|
|
222
|
+
TWITTER_ACCESS_TOKEN=xxx
|
|
223
|
+
TWITTER_ACCESS_TOKEN_SECRET=xxx
|
|
224
|
+
|
|
225
|
+
TWITTER_POST_ENABLE=true
|
|
226
|
+
TWITTER_SEARCH_ENABLE=true
|
|
227
|
+
TWITTER_AUTO_RESPOND_MENTIONS=true
|
|
228
|
+
TWITTER_AUTO_RESPOND_REPLIES=true
|
|
83
229
|
```
|
|
84
230
|
|
|
85
|
-
|
|
231
|
+
### Testing Without Posting?
|
|
86
232
|
|
|
87
|
-
|
|
233
|
+
```bash
|
|
234
|
+
# Dry run mode
|
|
235
|
+
TWITTER_DRY_RUN=true # Simulates all actions
|
|
236
|
+
TWITTER_POST_ENABLE=true
|
|
237
|
+
TWITTER_POST_IMMEDIATELY=true
|
|
238
|
+
```
|
|
88
239
|
|
|
89
|
-
|
|
90
|
-
2. **API v2 Access**: Ensure your app has API v2 access enabled
|
|
91
|
-
3. **Credentials**: Generate API Key, API Secret, Access Token, and Access Token Secret
|
|
240
|
+
## ๐ง Troubleshooting
|
|
92
241
|
|
|
93
|
-
###
|
|
242
|
+
### "403 Forbidden" When Posting
|
|
94
243
|
|
|
95
|
-
1
|
|
96
|
-
2. Create a new app or use an existing one
|
|
97
|
-
3. Navigate to "Keys and tokens"
|
|
98
|
-
4. Generate/copy:
|
|
99
|
-
- API Key (`TWITTER_API_KEY`)
|
|
100
|
-
- API Secret Key (`TWITTER_API_SECRET_KEY`)
|
|
101
|
-
- Access Token (`TWITTER_ACCESS_TOKEN`)
|
|
102
|
-
- Access Token Secret (`TWITTER_ACCESS_TOKEN_SECRET`)
|
|
244
|
+
This is the #1 issue! Your app has read-only permissions.
|
|
103
245
|
|
|
104
|
-
|
|
246
|
+
**Solution:**
|
|
247
|
+
1. Go to app settings โ "User authentication settings"
|
|
248
|
+
2. Change to "Read and write"
|
|
249
|
+
3. Save settings
|
|
250
|
+
4. **CRITICAL**: Regenerate your Access Token & Secret
|
|
251
|
+
5. Update `.env` with NEW tokens
|
|
252
|
+
6. Restart your bot
|
|
253
|
+
|
|
254
|
+
**How to verify:** In "Keys and tokens", your Access Token should show "Created with Read and Write permissions"
|
|
105
255
|
|
|
106
|
-
###
|
|
256
|
+
### "Could not authenticate you"
|
|
107
257
|
|
|
108
|
-
|
|
109
|
-
- Configurable posting intervals with randomization
|
|
110
|
-
- Character-based content generation
|
|
111
|
-
- Support for long-form tweets (up to 4000 characters)
|
|
112
|
-
- Dry-run mode for testing
|
|
258
|
+
Wrong credentials or using OAuth 2.0 instead of OAuth 1.0a.
|
|
113
259
|
|
|
114
|
-
|
|
260
|
+
**Solution:**
|
|
261
|
+
- Use credentials from "Consumer Keys" section (API Key/Secret)
|
|
262
|
+
- Use credentials from "Authentication Tokens" section (Access Token/Secret)
|
|
263
|
+
- Do NOT use OAuth 2.0 Client ID, Client Secret, or Bearer Token
|
|
115
264
|
|
|
116
|
-
|
|
117
|
-
- **Weighted Algorithm**: Scores tweets based on user relationships, time, and relevance
|
|
118
|
-
- **Latest Algorithm**: Processes tweets in chronological order
|
|
119
|
-
- Configurable interaction limits and intervals
|
|
120
|
-
- Smart caching to avoid duplicate processing
|
|
265
|
+
### Bot Not Posting Automatically
|
|
121
266
|
|
|
122
|
-
|
|
267
|
+
**Checklist:**
|
|
268
|
+
- โ
Is `TWITTER_POST_ENABLE=true`?
|
|
269
|
+
- โ
Is `@elizaos/plugin-bootstrap` installed?
|
|
270
|
+
- โ
Does your character have `postExamples`?
|
|
271
|
+
- โ
Check logs for "Twitter posting is ENABLED"
|
|
272
|
+
- โ
Try `TWITTER_POST_IMMEDIATELY=true` for testing
|
|
123
273
|
|
|
124
|
-
|
|
125
|
-
- **Mentions**: Responds to tweets mentioning the bot
|
|
126
|
-
- **Replies**: Handles replies to the bot's tweets
|
|
127
|
-
- **Direct Messages**: Processes DMs when enabled
|
|
128
|
-
- **Target Users**: Can be configured to only interact with specific users
|
|
274
|
+
### Timeline Not Loading
|
|
129
275
|
|
|
130
|
-
|
|
276
|
+
**Common causes:**
|
|
277
|
+
- Rate limiting (check Twitter Developer Portal)
|
|
278
|
+
- Invalid credentials
|
|
279
|
+
- Account restrictions
|
|
131
280
|
|
|
132
|
-
|
|
133
|
-
- Configurable search intervals
|
|
134
|
-
- Relevance-based filtering
|
|
135
|
-
- User targeting with wildcard support
|
|
281
|
+
### "Invalid or expired token"
|
|
136
282
|
|
|
137
|
-
|
|
283
|
+
Your tokens may have been revoked or regenerated.
|
|
138
284
|
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
285
|
+
**Solution:**
|
|
286
|
+
1. Go to Twitter Developer Portal
|
|
287
|
+
2. Regenerate all tokens
|
|
288
|
+
3. Update `.env`
|
|
289
|
+
4. Restart bot
|
|
143
290
|
|
|
144
|
-
##
|
|
291
|
+
## ๐ Advanced Features
|
|
145
292
|
|
|
146
293
|
### Timeline Algorithms
|
|
147
294
|
|
|
@@ -161,16 +308,16 @@ Automatically handles:
|
|
|
161
308
|
# Interact with everyone (default)
|
|
162
309
|
TWITTER_TARGET_USERS=
|
|
163
310
|
|
|
164
|
-
# Interact with specific users
|
|
311
|
+
# Interact with specific users only
|
|
165
312
|
TWITTER_TARGET_USERS=user1,user2,user3
|
|
166
313
|
|
|
167
|
-
# Interact with everyone (explicit
|
|
314
|
+
# Interact with everyone (explicit)
|
|
168
315
|
TWITTER_TARGET_USERS=*
|
|
169
316
|
```
|
|
170
317
|
|
|
171
|
-
###
|
|
318
|
+
### Natural Posting Intervals
|
|
172
319
|
|
|
173
|
-
All intervals support variance for more
|
|
320
|
+
All intervals support variance for more human-like behavior:
|
|
174
321
|
```bash
|
|
175
322
|
# Base interval: 90-180 minutes
|
|
176
323
|
TWITTER_POST_INTERVAL_MIN=90
|
|
@@ -179,9 +326,15 @@ TWITTER_POST_INTERVAL_MAX=180
|
|
|
179
326
|
TWITTER_POST_INTERVAL_VARIANCE=0.2
|
|
180
327
|
```
|
|
181
328
|
|
|
182
|
-
|
|
329
|
+
### Request Queue & Rate Limiting
|
|
183
330
|
|
|
184
|
-
|
|
331
|
+
The plugin includes sophisticated rate limiting:
|
|
332
|
+
- Automatic retry with exponential backoff
|
|
333
|
+
- Request queue to prevent API abuse
|
|
334
|
+
- Configurable retry limits
|
|
335
|
+
- Built-in caching to reduce API calls
|
|
336
|
+
|
|
337
|
+
## ๐งช Development & Testing
|
|
185
338
|
|
|
186
339
|
```bash
|
|
187
340
|
# Run tests
|
|
@@ -194,56 +347,47 @@ DEBUG=eliza:* bun start
|
|
|
194
347
|
TWITTER_DRY_RUN=true bun start
|
|
195
348
|
```
|
|
196
349
|
|
|
197
|
-
###
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
-
|
|
207
|
-
-
|
|
208
|
-
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
-
|
|
218
|
-
-
|
|
219
|
-
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
-
|
|
226
|
-
-
|
|
227
|
-
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
For issues or questions:
|
|
242
|
-
1. Check the Common Issues section above
|
|
243
|
-
2. Enable debug logging: `DEBUG=eliza:*`
|
|
244
|
-
3. Verify your API credentials and permissions
|
|
245
|
-
4. Check Twitter API v2 status and limits
|
|
246
|
-
5. Open an issue with:
|
|
247
|
-
- Error messages and logs
|
|
248
|
-
- Configuration details (without credentials)
|
|
249
|
-
- Steps to reproduce
|
|
350
|
+
### Testing Checklist
|
|
351
|
+
|
|
352
|
+
1. **Test Auth**: Check logs for successful Twitter login
|
|
353
|
+
2. **Test Posting**: Set `TWITTER_POST_IMMEDIATELY=true`
|
|
354
|
+
3. **Test Dry Run**: Use `TWITTER_DRY_RUN=true` first
|
|
355
|
+
4. **Monitor Logs**: Look for "Twitter posting is ENABLED"
|
|
356
|
+
|
|
357
|
+
## ๐ Security Best Practices
|
|
358
|
+
|
|
359
|
+
- Store credentials in `.env` file (never commit!)
|
|
360
|
+
- Use `.env.local` for local development
|
|
361
|
+
- Regularly rotate API keys
|
|
362
|
+
- Monitor API usage in Developer Portal
|
|
363
|
+
- Enable only necessary permissions
|
|
364
|
+
- Review [Twitter's automation rules](https://help.twitter.com/en/rules-and-policies/twitter-automation)
|
|
365
|
+
|
|
366
|
+
## ๐ API Usage & Limits
|
|
367
|
+
|
|
368
|
+
This plugin uses Twitter API v2 endpoints efficiently:
|
|
369
|
+
- **Home Timeline**: Cached and refreshed periodically
|
|
370
|
+
- **Tweet Creation**: Rate limited automatically
|
|
371
|
+
- **User Lookups**: Cached to reduce calls
|
|
372
|
+
- **Search**: Configurable intervals
|
|
373
|
+
|
|
374
|
+
Monitor your usage at: https://developer.twitter.com/en/portal/dashboard
|
|
375
|
+
|
|
376
|
+
## ๐ Additional Resources
|
|
377
|
+
|
|
378
|
+
- [Twitter API v2 Documentation](https://developer.twitter.com/en/docs/twitter-api)
|
|
379
|
+
- [Twitter OAuth 1.0a Guide](https://developer.twitter.com/en/docs/authentication/oauth-1-0a)
|
|
380
|
+
- [Rate Limits Reference](https://developer.twitter.com/en/docs/twitter-api/rate-limits)
|
|
381
|
+
- [ElizaOS Documentation](https://github.com/elizaos/eliza)
|
|
382
|
+
|
|
383
|
+
## ๐ค Contributing
|
|
384
|
+
|
|
385
|
+
Contributions are welcome! Please:
|
|
386
|
+
1. Check existing issues first
|
|
387
|
+
2. Follow the code style
|
|
388
|
+
3. Add tests for new features
|
|
389
|
+
4. Update documentation
|
|
390
|
+
|
|
391
|
+
## ๐ License
|
|
392
|
+
|
|
393
|
+
This plugin is part of the ElizaOS project. See the main repository for license information.
|