You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This twitter api shit sucks. been troubleshooting for hours. bot doesnt work. Just literally trying to take a screenshot and upload to twitter with a tweet caption.
Here is my current code:
const fs = require('fs/promises');
const path = require('path');
const screenshot = require('screenshot-desktop');
const sharp = require('sharp'); // image resizer
const Twit = require('twit'); // twitter
} catch (error) {
console.error(Error: ${error.message});
}
})();
And this is what returns in the terminal.: S C:\users\mattr\desktop\twitter-bot> node twitter-bot
Starting tweet process
Screenshot captured with width 3440 and height 1440
Screenshot resized and saved
Media uploaded with ID undefined
Tweet posted successfully!
Tweet result:
Data:
I hate this stupid damn new twitter api. They suck. If anyone can figure this issue out as to why there is no tweet result, data and media upload with id undefined. My god you will be a lifesaver. Good luck because it's impossible.
The text was updated successfully, but these errors were encountered:
This twitter api shit sucks. been troubleshooting for hours. bot doesnt work. Just literally trying to take a screenshot and upload to twitter with a tweet caption.
Here is my current code:
const fs = require('fs/promises');
const path = require('path');
const screenshot = require('screenshot-desktop');
const sharp = require('sharp'); // image resizer
const Twit = require('twit'); // twitter
const screenshotPath = path.join(__dirname, 'screenshot.png');
const TwitterObject = new Twit({
consumer_key: 'my key',
consumer_secret: 'my key',
access_token: 'my key',
access_token_secret: 'my key',
timeout_ms: 5 * 1000,
strictSSL: true,
app_only_auth: true,
base_url: 'https://api.twitter.com/2', // second version API
});
(async () => {
try {
console.log('Starting tweet process');
} catch (error) {
console.error(
Error: ${error.message}
);}
})();
And this is what returns in the terminal.: S C:\users\mattr\desktop\twitter-bot> node twitter-bot
Starting tweet process
Screenshot captured with width 3440 and height 1440
Screenshot resized and saved
Media uploaded with ID undefined
Tweet posted successfully!
Tweet result:
Data:
I hate this stupid damn new twitter api. They suck. If anyone can figure this issue out as to why there is no tweet result, data and media upload with id undefined. My god you will be a lifesaver. Good luck because it's impossible.
The text was updated successfully, but these errors were encountered: