Skip to content

Commit

Permalink
VERVCELLLLL
Browse files Browse the repository at this point in the history
  • Loading branch information
jongan69 committed Jan 4, 2025
1 parent c067ca1 commit d420630
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions src/pages/api/twitter/tweet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,12 @@ const client = new Twitter({
accessSecret: process.env.TWITTER_ACCESS_TOKEN_SECRET!,
});

console.log(process.env.TWITTER_API_KEY);
console.log(process.env.TWITTER_API_SECRET);
console.log(process.env.TWITTER_ACCESS_TOKEN);
console.log(process.env.TWITTER_ACCESS_TOKEN_SECRET);

export async function postTweet(message: string) {
try {
await client.v2.tweet(message);
console.log('Successfully tweeted:', message);
} catch (error) {
console.error('Error posting tweet:', error);
throw error;
console.log(error);
}
}

0 comments on commit d420630

Please sign in to comment.