Skip to content

Commit

Permalink
Post data to Twitter in JSON instead of x-www-form-urlencoded
Browse files Browse the repository at this point in the history
  • Loading branch information
xdavidhu authored Oct 14, 2023
1 parent bdeca9e commit d017f17
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion infra/builder/builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def new_tweet(title, bounty, author, url, mention=False):
bounty_string = "???" if bounty == "?" else f"{float(bounty):,g}"
tweet_string = f"New Google VRP writeup \"{title}\" for a bounty of ${bounty_string} by {author_string}:\n{url}"
try:
r = twitter.post("https://api.twitter.com/2/tweets", data={"text": tweet_string})
r = twitter.post("https://api.twitter.com/2/tweets", json={"text": tweet_string})
if r.status_code == 200:
return True
else:
Expand Down

0 comments on commit d017f17

Please sign in to comment.