You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You can refer to `examples/test_game_twitter.py` for more examples on how to call the twitter functions. Note that there is a limited number of functions available. If you require more, please submit a feature requests via Github Issues.
58
+
59
+
- `TwitterPlugin`
60
+
- If you don't already have one, create a X (twitter) account and navigate to the [developer portal](https://developer.x.com/en/portal/dashboard).
61
+
- Create a project app, generate the following credentials and set the following environment variables (e.g. using a `.bashrc` or a `.zshrc` file):
62
+
- `TWITTER_API_KEY`
63
+
- `TWITTER_API_SECRET_KEY`
64
+
- `TWITTER_ACCESS_TOKEN`
65
+
- `TWITTER_ACCESS_TOKEN_SECRET`
66
+
- Import and initialize the plugin to use in your worker:
67
+
```python
68
+
import os
69
+
from twitter_plugin_gamesdk.twitter_plugin import TwitterPlugin
70
+
71
+
# Define your options with the necessary credentials
72
+
options = {
73
+
"id": "test_twitter_worker",
74
+
"name": "Test Twitter Worker",
75
+
"description": "An example Twitter Plugin for testing.",
0 commit comments