Skip to content

Commit 38fd7d9

Browse files
committed
[twitter plugin] update example for virtuals_tweepy mimetype, update virtuals_tweepy for bugfix, bump up twitter plugin to 0.2.10
1 parent 804d3eb commit 38fd7d9

2 files changed

Lines changed: 4 additions & 3 deletions

File tree

plugins/twitter/examples/test_twitter.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
def run_twitter_actions():
77
load_dotenv()
88
token = os.getenv("GAME_TWITTER_ACCESS_TOKEN")
9+
print("Token:", token)
910
if not token:
1011
raise RuntimeError("Please set GAME_TWITTER_ACCESS_TOKEN in your .env")
1112

@@ -62,7 +63,7 @@ def run_twitter_actions():
6263

6364
# 5. Upload local media and tweet
6465
with open("sample_media/virtuals-logo.png", "rb") as img:
65-
media_id = client.upload_media(media=img)
66+
media_id = client.upload_media(media=img, media_type="image/png")
6667
local = client.create_tweet(
6768
text="Check this out! Uploaded with local media!",
6869
media_ids=[media_id]

plugins/twitter/pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "poetry.core.masonry.api"
44

55
[tool.poetry]
66
name = "twitter-plugin-gamesdk"
7-
version = "0.2.9"
7+
version = "0.2.10"
88
description = "Twitter Plugin for Python SDK for GAME by Virtuals"
99
authors = ["Celeste Ang <celeste@virtuals.io>"]
1010
readme = "README.md"
@@ -15,7 +15,7 @@ repository = "https://github.com/game-by-virtuals/game-python"
1515
[tool.poetry.dependencies]
1616
python = ">=3.9"
1717
tweepy = ">=4.15.0"
18-
virtuals-tweepy = ">=0.1.4"
18+
virtuals-tweepy = ">=0.1.5"
1919

2020
[tool.poetry.scripts]
2121
twitter-plugin-gamesdk = "twitter_plugin_gamesdk.game_twitter_auth:start"

0 commit comments

Comments
 (0)