Skip to content

Commit f3f15de

Browse files
authored
Merge pull request #172 from game-by-virtuals/read-me-changes
Update README.md
2 parents 76a1a71 + c0d4314 commit f3f15de

File tree

1 file changed

+56
-56
lines changed

1 file changed

+56
-56
lines changed

plugins/twitter/README.md

Lines changed: 56 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,62 @@
22

33
The **Twitter Plugin** provides a lightweight interface for integrating Twitter (X) functionality into your GAME SDK agents. Built on top of [`virtuals_tweepy`](https://pypi.org/project/virtuals-tweepy/) by the Virtuals team — a maintained fork of [`Tweepy`](https://pypi.org/project/tweepy/)) — this plugin lets you easily post tweets, fetch data, and execute workflows through agent logic.
44

5-
Use it standalone or compose multiple Twitter actions as part of a larger agent job.
5+
## 📜 GAME X API Usage Terms & Rules
6+
By using the GAME X API, you agree to the following terms. Violation of any rule may result in immediate revocation of access. We reserve the right to modify API behavior, limits, or access rights at any time, with or without notice.
7+
8+
### ✅ Allowed Usage (Green Flags)
9+
#### General
10+
- Keep under 50 posts/day
11+
- Follow/unfollow: <100/day
12+
- Use organic, varied language—avoid robotic or repetitive posts
13+
- Use a mix of images, videos, and text-based content
14+
- Include polls, threads, quotes, retweets to encourage engagement
15+
- Mark account as sensitive if needed
16+
- Always include the automated label for agent-generated content
17+
18+
#### Replies, Mentions, and DMs
19+
- Max 10 replies/hour to different users
20+
- Max 10 DMs/day to new users
21+
- Agent may only reply or DM when:
22+
- User mentions, replies, retweets, or DMs the agent
23+
- Only 1 automated reply/DM per interaction
24+
- Always validate post existence before replying (statuses/lookup)
25+
- Filter for sensitive usernames/media/content
26+
27+
#### ✉️ DM Rules
28+
- DMs must be triggered by valid user interaction
29+
30+
Only use:
31+
- GET /dm_conversations
32+
- GET /dm_events
33+
- POST /dm_events/new
34+
- No crawling, scraping, or off-platform storage of DM data
35+
- No DMs used to bypass rate limits or coordinate bot activity
36+
- One DM per user trigger, no spamming
37+
38+
### 🚫 Prohibited Activity (Red Flags)
39+
- ❌ Liking tweets, adding users to lists/collections
40+
- ❌ Engagement farming (e.g., repetitive “Like if…” prompts)
41+
- ❌ Auto-posting about trending topics
42+
- ❌ Duplicate phrases across posts/accounts
43+
- ❌ Tweet bursts (post every 10–15 mins, minimum)
44+
- ❌ Over-replying or over-DMing
45+
- ❌ Misleading or redirect-heavy links
46+
- ❌ Harassment, abuse, hate speech, or doxxing
47+
- ❌ Cloning multiple automated accounts for similar purposes
48+
49+
## 🚀 API Access Tiers
50+
### Tier 1 — Default
51+
- Basic access
52+
- Standard rate limits
53+
54+
### Tier 2 — Elevated
55+
- Higher rate limits
56+
- Request access via Discord → @virtualsio
57+
- Requires verification
658

759
---
60+
Use it standalone or compose multiple Twitter actions as part of a larger agent job.
861

962
## Installation
1063

@@ -23,18 +76,13 @@ pip install twitter_plugin_gamesdk
2376
---
2477

2578
## Authentication Methods
26-
27-
We support two primary ways to authenticate:
28-
29-
### 1. GAME's Sponsored X Enterprise Access Token (Recommended)
30-
3179
Virtuals sponsors the community with a **Twitter Enterprise API access plan**, using OAuth 2.0 with PKCE. This provides:
3280

3381
- Higher rate limits: **35 calls / 5 minutes**
3482
- Smoother onboarding
3583
- Free usage via your `GAME_API_KEY`
3684

37-
#### a. Get Your Access Token
85+
#### 1. Get Your Access Token
3886

3987
Run the following command to authenticate using your `GAME_API_KEY`:
4088

@@ -54,7 +102,7 @@ Authenticated! Here's your access token:
54102
apx-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
55103
```
56104
57-
#### b. Store Your Access Token
105+
#### 2. Store Your Access Token
58106
59107
We recommend storing environment variables in a `.env` file:
60108
@@ -84,54 +132,6 @@ client = twitter_plugin.twitter_client
84132
85133
client.create_tweet(text="Tweeting with GAME Access Token!")
86134
```
87-
88-
---
89-
90-
### 2. Use Your Own Twitter Developer Credentials
91-
92-
Use this option if you need access to Twitter endpoints requiring a different auth level (e.g., **OAuth 1.0a User Context** or **OAuth 2.0 App Only**).
93-
94-
> See [X API Auth Mapping](https://docs.x.com/resources/fundamentals/authentication/guides/v2-authentication-mapping) to determine which auth level is required for specific endpoints.
95-
96-
#### a. Get Your Developer Credentials
97-
98-
1. Sign in to the [Twitter Developer Portal](https://developer.x.com/en/portal/dashboard).
99-
2. Create a project and app.
100-
3. Generate the following keys and store them in your `.env` file:
101-
102-
```
103-
# .env
104-
105-
TWITTER_API_KEY=...
106-
TWITTER_API_SECRET_KEY=...
107-
TWITTER_ACCESS_TOKEN=...
108-
TWITTER_ACCESS_TOKEN_SECRET=...
109-
```
110-
111-
#### b. Initialize the Plugin
112-
113-
```python
114-
import os
115-
from dotenv import load_dotenv
116-
from twitter_plugin_gamesdk.twitter_plugin import TwitterPlugin
117-
118-
load_dotenv()
119-
120-
options = {
121-
"credentials": {
122-
"api_key": os.environ.get("TWITTER_API_KEY"),
123-
"api_key_secret": os.environ.get("TWITTER_API_SECRET_KEY"),
124-
"access_token": os.environ.get("TWITTER_ACCESS_TOKEN"),
125-
"access_token_secret": os.environ.get("TWITTER_ACCESS_TOKEN_SECRET"),
126-
}
127-
}
128-
129-
twitter_plugin = TwitterPlugin(options)
130-
client = twitter_plugin.twitter_client
131-
132-
client.create_tweet(text="Tweeting with personal developer credentials!")
133-
```
134-
135135
---
136136
137137
## Examples

0 commit comments

Comments
 (0)