import { TwitterApi } from "npm:twitter-api-v2";
export async function tweet(text, appKey, appSecret, accessToken, accessSecret) {
const client = new TwitterApi({
appKey,
appSecret,
accessToken,
accessSecret,
});
const { data: createdTweet } = await client.v2.tweet(text);
console.log("Tweet", createdTweet.id, ":", createdTweet.text);
}