Can somebody explain further difference of using Essential and Elevated? #235
-
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 1 reply
-
Hi I was able to make it work by using this: But I still need more enlightenment for my questions from the image above...yes sorry I'm a complete beginner with a little background on javascript and python |
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
As @PLhery said, Essentials level only gives you access to v2 endpoints. But you're not restricted on authentication method (OAuth 1/2, App only, etc.) If you want to send tweets for your accounts, or get your own tweets, here's a quick guide.
const client = new TwitterApi({
// appKey/appSecret are identifiers for your application on Twitter
appKey: '', // < Here's the "consumer key" available on the dev portal
appSecret: '', // < Here's the "consumer secret" available on the dev portal
// access keys are special keys defining an association between your application and a Twitter account
accessToken: '', // < Here's your "access token", which can be generated under consumer keys
accessSecret: '', // < Here's the secret associated under access token
})
const me = await client.v2.me()
// Get your user ID from your user object
const myUserId = me.data.id
// Get my tweets using your user ID
const myTweets = await client.v2.userTimeline(meUserId)
// Iterate over fetched tweets
for (const tweet of myTweets) {
console.log('Tweet', tweet.id, ', text:', tweet.text)
}
// If there's more tweets to go, you can fetch the next page
if (!myTweets.done) {
const nextPage = await myTweets.next()
for (const tweet of nextPage) {
console.log('Page 2 ; Tweet', tweet.id, ', text:', tweet.text)
}
// etc...
}
await client.v2.tweet('hello!') |
Beta Was this translation helpful? Give feedback.
As @PLhery said, Essentials level only gives you access to v2 endpoints. But you're not restricted on authentication method (OAuth 1/2, App only, etc.)
If you want to send tweets for your accounts, or get your own tweets, here's a quick guide.