TypeScript で TwitterAPI (v1) を扱う
2020/02/25 15:02:542022/10/18 16:03:42
sh
yarn add twitter-api-v2
init.ts
import { TwitterApi } from "twitter-api-v2"
const client = new TwitterApi({
appKey: ck,
appSecret: cs,
accessToken: at,
accessSecret: ats,
})
getMySelf.ts
const me = await client.v1.verifyCredentials()
tweet.ts
const tweet = await client.v1.tweet("はろー")
Generated from
TypeScript で TwitterAPI (v1) を扱う