Skip to content

Commit

Permalink
Migrate to v2 Twitter API
Browse files Browse the repository at this point in the history
  • Loading branch information
xdavidhu authored Oct 14, 2023
1 parent 58dcafe commit 3f6a5e2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions 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/1.1/statuses/update.json", data={"status": tweet_string})
r = twitter.post("https://api.twitter.com/2/tweets", data={"text": tweet_string})
if r.status_code == 200:
return True
except:
Expand Down Expand Up @@ -114,4 +114,4 @@ def builder():
# Request an archive for the repo page
archive(repo_url)

builder()
builder()

0 comments on commit 3f6a5e2

Please sign in to comment.