Public
Back
Version 0
8/18/2023
async function twitter(req: Request) {
const { res, token, storage } = await andreterron
.twitterAuthHandler(req, {
client_id: me.secrets.twitter_client_id,
client_secret: me.secrets.twitter_client_secret,
redirect_uri: "https://YOUR_USERNAME-twitter.web.val.run/callback",
scopes: ["tweet.read", "tweet.write", "users.read", "offline.access"],
storage: me.twitter_auth_storage,
});
//
if (storage) {
me.twitter_auth_storage = storage;
}
//
if (token) {
me.twitter_token = token;
}
//
return res;
}
Updated: October 23, 2023