Compare commits

..

10 Commits

Author SHA1 Message Date
NAME a7ba436169 Init 2026-05-13 06:55:11 +00:00
NAME 10d61d59be Update 2026-05-13 02:30:00 +00:00
NAME b4be37fbe7 D 2026-05-13 02:18:31 +00:00
NAME d6220c828e Update like 2026-05-12 15:32:21 +00:00
NAME 1d7bddae27 D 2026-05-12 09:31:30 +00:00
NAME 38ed73d7e6 D 2026-05-12 09:27:46 +00:00
NAME aaf28c1463 D 2026-05-12 09:20:04 +00:00
NAME 62a01a118b D 2026-05-12 09:14:12 +00:00
NAME 8a7df08b6a D 2026-05-12 09:04:52 +00:00
NAME f62a71aede D 2026-05-12 08:42:26 +00:00
6 changed files with 209 additions and 91 deletions
+3 -3
View File
@@ -1,19 +1,19 @@
import {Controller, Get, Post} from '@nestjs/common';
import {AppService} from './app.service';
import {XCookieAccountDto} from "./x-poster/dto/x-cookie-account.dto";
import {XBrowserService} from "./x-poster/x-browser.service";
import {XPosterRouterService} from "./x-poster/x-poster.router.service";
@Controller()
export class AppController {
constructor(
private readonly appService: AppService,
private readonly xBrowserService: XBrowserService,
private readonly xPosterRouterService: XPosterRouterService,
) {
}
@Get()
getHello() {
return this.xBrowserService.verifyCookie();
return this.xPosterRouterService.verifyCookie();
}
@Post('/set-x-cookies')
+8 -1
View File
@@ -8,13 +8,17 @@ export class NotifyService {
const BOT_TOKEN = process.env.TELEGRAM_BOT_TOKEN!;
const CHAT_ID = process.env.TELEGRAM_CHAT_ID!;
const X_USERNAME = process.env.X_USERNAME!;
await axios.post(
`https://api.telegram.org/bot${BOT_TOKEN}/sendMessage`,
{
chat_id: CHAT_ID,
text: message,
text: `F:${X_USERNAME}==>${message}`,
parse_mode: 'HTML'
},
{
timeout: 10000 // 5 seconds
}
);
@@ -33,6 +37,9 @@ export class NotifyService {
chat_id: CHAT_ID,
text: `X:${X_USERNAME}==>${message}`,
parse_mode: 'HTML'
},
{
timeout: 10000 // 5 seconds
}
);
+16 -12
View File
@@ -19,20 +19,23 @@ export class SqsPosterWorker {
}
async start() {
console.log(`🚀 Worker started for ${await this.sqs.getQueueName()}`);
this.logger.log(`🚀 Worker started for ${await this.sqs.getQueueName()}`);
await this.notifyService.sendMessageToTele(`🚀 Worker started for ${await this.sqs.getQueueName()}`)
//check cookie
this.xRouterService.verifyCookie();
this.xRouterService.verifyCookie().catch((err) => {
console.error(`SqsPosterWorker_verifyCookie`);
console.error(err);
});
let ReceiptHandle = '';
while (true) {
try {
console.log('worker get message ...');
this.logger.log('worker get message ...');
const msg = await this.sqs.getMessage();
if (!msg) {
console.log('no message , sleeping...');
this.logger.log('no message , sleeping...');
await this.sleep(10000); //sleep 10s
continue;
}
@@ -60,7 +63,7 @@ export class SqsPosterWorker {
}
private async process(data: any) {
console.log('📩 Got job:', data);
this.logger.log('📩 Got job:', data);
const {type, content, xSubmitProvider, tweetUrl, publishTo, tweetId, telegramChatId} = data;
switch (type) {
case 'X_POSTER_TWEET': {
@@ -68,6 +71,7 @@ export class SqsPosterWorker {
content,
publishTo,
xSubmitProvider);
await this.sleep(10000); //sleep 10s
break;
}
case 'X_POSTER_REPLY': {
@@ -108,16 +112,16 @@ export class SqsPosterWorker {
strategy: string = XStrategy.API_ONLY,
) {
try {
console.log(`==> doPostTweet`, publishTo);
this.logger.log(`==> doPostTweet`, publishTo);
let sendSuccess = false;
if (publishTo.includes(SUPPORT_SOCIAL_PROVIDERS.FB)) {
console.log(`==> doPostTweet publish to fb`);
this.logger.log(`==> doPostTweet publish to fb`);
await this.facebookApi.postToPage(text);
await this.notifyService.sendMessageToTele(`Post to FB success`);
sendSuccess = true;
}
if (publishTo.includes(SUPPORT_SOCIAL_PROVIDERS.X)) {
console.log(`==> doPostTweet publish to X`);
this.logger.log(`==> doPostTweet publish to X`);
// @ts-ignore
const r = await this.xRouterService.postTweet({text, strategy});
@@ -147,7 +151,7 @@ export class SqsPosterWorker {
strategy: string = XStrategy.BROWSER_COOKIE
) {
try {
console.log('doReplyTweet');
this.logger.log('doReplyTweet');
// @ts-ignore
const r = await this.xRouterService.postReply({text, tweetUrl, tweetId, strategy});
if (r.success) {
@@ -160,8 +164,8 @@ export class SqsPosterWorker {
return r
} catch (e) {
this.logger.error(e);
console.log("Mã lỗi:", e.code); // Ví dụ: 'ECONNABORTED' (timeout), 'ERR_NETWORK' (mất mạng)
console.log("Thông báo:", e.message);
this.logger.log("Mã lỗi:", e.code); // Ví dụ: 'ECONNABORTED' (timeout), 'ERR_NETWORK' (mất mạng)
this.logger.log("Thông báo:", e.message);
await this.notifyService.sendMessageToTele(`Worker==> doReplyTweet error:${e.code} - ${e.message}`)
@@ -175,7 +179,7 @@ export class SqsPosterWorker {
strategy: string = XStrategy.BROWSER_COOKIE
) {
try {
console.log('doQuoteTweet');
this.logger.log('doQuoteTweet');
// @ts-ignore
const r = await this.xRouterService.postQuote({text, tweetUrl, tweetId, strategy});
if (r.success) {
+165 -69
View File
@@ -60,15 +60,15 @@ export class XBrowserService implements OnModuleInit, OnModuleDestroy {
account: BrowserAccount,
useCache = true
): Promise<BrowserContext> {
console.log('getOrCreateContext:1')
// console.log({account});
this.logger.debug('getOrCreateContext:1')
// this.logger.debug({account});
const cached = this.contextPool.get(account.accountId);
if (useCache && cached) {
console.log('getOrCreateContext:cached');
this.logger.debug('getOrCreateContext:cached');
cached.lastUsed = Date.now();
return cached.ctx;
}
console.log('getOrCreateContext:2')
this.logger.debug('getOrCreateContext:2')
// LRU eviction
if (this.contextPool.size >= this.MAX_CONTEXTS) {
@@ -78,10 +78,10 @@ export class XBrowserService implements OnModuleInit, OnModuleDestroy {
await oldest[1].ctx.close().catch(() => null);
this.contextPool.delete(oldest[0]);
}
console.log('getOrCreateContext:3')
this.logger.debug('getOrCreateContext:3')
const browser = await this.ensureBrowser(account.headless);
console.log('getOrCreateContext:4')
this.logger.debug('getOrCreateContext:4')
const ctx = await browser.newContext({
userAgent:
@@ -92,15 +92,15 @@ export class XBrowserService implements OnModuleInit, OnModuleDestroy {
locale: process.env.BROWSER_LOCALE || 'en-US',
proxy: account.proxy ? {server: account.proxy} : undefined,
});
console.log('getOrCreateContext:5')
this.logger.debug('getOrCreateContext:5')
// Anti-detection: ẩn webdriver flag
await ctx.addInitScript(() => {
Object.defineProperty(navigator, 'webdriver', {get: () => undefined});
});
console.log('getOrCreateContext:6')
this.logger.debug('getOrCreateContext:6')
// console.log(account.cookies);
// this.logger.debug(account.cookies);
await ctx.addCookies(
account.cookies.map((c) => ({
@@ -111,9 +111,9 @@ export class XBrowserService implements OnModuleInit, OnModuleDestroy {
);
this.contextPool.set(account.accountId, {ctx, lastUsed: Date.now()});
console.log('getOrCreateContext:7')
this.logger.debug('getOrCreateContext:7')
// console.log({
// this.logger.debug({
// ctx
// })
return ctx;
@@ -126,9 +126,9 @@ export class XBrowserService implements OnModuleInit, OnModuleDestroy {
async getPage(account: BrowserAccount): Promise<Page> {
let ctx = await this.getOrCreateContext(account);
console.log('Đã khởi tạo ctx')
this.logger.debug('Đã khởi tạo ctx')
if (ctx.isClosed()) {
console.log('browser is closeed, reopen');
this.logger.debug('browser is closeed, reopen');
ctx = await this.getOrCreateContext(account, false);
}
const cookies = account.cookies.map((c) => ({
@@ -136,38 +136,108 @@ export class XBrowserService implements OnModuleInit, OnModuleDestroy {
domain: c.domain || '.x.com',
path: c.path || '/',
}));
// console.log('cookies:', cookies);
// this.logger.debug('cookies:', cookies);
await ctx.addCookies(cookies);
return ctx.newPage();
}
async verifyCookie() {
const page = await this.newPage();
await page.goto('https://x.com/', {
waitUntil: 'domcontentloaded',
timeout: 30_000,
});
await page.waitForTimeout(2000 + (Math.random() + Math.random()) * 3000);
await page.mouse.wheel(0, rand(300, 500));
// Detect login/challenge screen
if (page.url().includes('/login') || page.url().includes('/flow')) {
this.logger.error('Cookies is die, please get news');
return false;
// return {
// success: false,
// error: 'Redirected to login',
// needsRelogin: true,
// };
}
const isLoggedIn = await page
.locator('[data-testid="SideNav_AccountSwitcher_Button"], [data-testid="AppTabBar_Home_Link"]')
.first()
.isVisible()
.catch(() => false);
this.logger.log(`🔐 Session restore: ${isLoggedIn ? 'LOGGED IN' : 'GUEST (cookie có thể expired)'}`);
await page.close();
return isLoggedIn;
try {
await page.goto('https://x.com/', {
waitUntil: 'domcontentloaded',
timeout: 30_000,
});
await page.waitForTimeout(2000 + (Math.random() + Math.random()) * 3000);
await page.mouse.wheel(0, rand(300, 500));
// Detect login/challenge screen
if (page.url().includes('/home')) {
this.logger.log('Cookies live');
return true;
// return {
// success: false,
// error: 'Redirected to login',
// needsRelogin: true,
// };
}
const isLoggedIn = await page
.locator('[data-testid="SideNav_AccountSwitcher_Button"], [data-testid="AppTabBar_Home_Link"]')
.first()
.isVisible()
.catch(() => false);
this.logger.log(`🔐 Session restore: ${isLoggedIn ? 'LOGGED IN' : 'GUEST (cookie có thể expired)'}`);
// await page.close();
return isLoggedIn;
} catch (er) {
this.logger.error(`Browser verify cookie fail: ${er.message}`);
return false;
} finally {
await page?.close().catch(() => null);
}
}
async likeTweet(tweetUrl: string) {
let page: Page | null = null;
try {
page = await this.newPage();
await page.goto(tweetUrl, {
waitUntil: 'domcontentloaded',
timeout: 30_000,
});
await this.actLikeTweet(page);
} catch (e) {
}
}
async actLikeTweet(page: Page, isCloseAfterEnd = false) {
try {
this.logger.debug('actLikeTweet:');
await page.waitForTimeout(2000 + (Math.random() + Math.random()) * 3000);
// 1. Cuộn xuống 1000 pixel
await page.mouse.wheel(0, rand(300, 500));
await page.waitForTimeout(rand(2000, 4000));
await page.mouse.wheel(0, rand(300, 500));
this.logger.debug('actLikeTweet:Đã cuộn xuống');
// Nghỉ 2 giây để quan sát
await page.waitForTimeout(rand(2000, 4000));
// 2. Cuộn ngược lên lại 500 pixel
await page.mouse.wheel(0, -1 * 1000);
this.logger.debug('actLikeTweet:Đã cuộn lên');
await page.waitForTimeout(rand(500, 1500));
//like
this.logger.debug('actLikeTweet:Bắt đầu nhấn like');
// Sử dụng selector cụ thể cho bài viết chính (thường có vai trò là article)
const mainTweetLike = page
.locator('article[data-testid="tweet"]').first()
.locator('button[data-testid="like"]');
await mainTweetLike.click();
this.logger.debug('actLikeTweet:Đã like xong');
return true;
} catch (e) {
this.logger.debug(e);
this.logger.error('actLikeTweet: Error:' + e.message);
return false;
} finally {
if (isCloseAfterEnd) {
page.close().catch(() => null);
}
}
}
async postTweet(
@@ -214,6 +284,14 @@ export class XBrowserService implements OnModuleInit, OnModuleDestroy {
needsRelogin: true,
};
}
const isLoggedIn = await page
.locator('[data-testid="SideNav_AccountSwitcher_Button"], [data-testid="AppTabBar_Home_Link"]')
.first()
.isVisible()
.catch(() => false);
this.logger.debug(`postTweet: ${isLoggedIn ? 'LOGGED IN' : 'LOGGED OUT'}`);
await page.mouse.wheel(200, rand(300, 800));
await page.waitForTimeout(rand(2000, 5000));
await page.evaluate(() => window.scrollTo({top: 0, behavior: 'smooth'}));
@@ -233,7 +311,7 @@ export class XBrowserService implements OnModuleInit, OnModuleDestroy {
} catch {
await textarea.fill(text);
}
console.log(' Nhập tweet xong ...');
this.logger.debug(' Nhập tweet xong ...');
await page.waitForTimeout(2000 + (Math.random() + Math.random()) * 3000);
await page.waitForTimeout(5000);
@@ -244,13 +322,13 @@ export class XBrowserService implements OnModuleInit, OnModuleDestroy {
// await page.locator('button[data-testid="tweetButtonInline"]').click({ force: true });
const btn = page.locator('button[data-testid="tweetButtonInline"]');
const btnBox = await btn.boundingBox();
console.log(btnBox);
console.log('Nhấn Control+Enter ...');
this.logger.debug(btnBox);
this.logger.debug('Nhấn Control+Enter ...');
// @ts-ignore
// await page.mouse.click(btnBox?.x + btnBox.width / 2, btnBox.y + btnBox.height / 2);
await page.keyboard.press('Control+Enter');
console.log('Nhấn Control+Enter done ...');
this.logger.debug('Nhấn Control+Enter done ...');
await page.waitForTimeout(5000);
// Chờ request CreateTweet hoàn tất
@@ -280,15 +358,23 @@ export class XBrowserService implements OnModuleInit, OnModuleDestroy {
try {
await page.goto(tweetUrl, {waitUntil: 'domcontentloaded', timeout: 30000});
} catch (e) {
console.log('❌ Load fail');
this.logger.debug('❌ Load fail');
throw e;
}
await page.waitForTimeout(rand(2000, 4000));
const isLoggedIn = await page
.locator('[data-testid="SideNav_AccountSwitcher_Button"], [data-testid="AppTabBar_Home_Link"]')
.first()
.isVisible()
.catch(() => false);
this.logger.debug(`postQuote: ${isLoggedIn ? 'LOGGED IN' : 'LOGGED OUT'}`);
// ===== CHECK LOGIN =====
if (await page.locator('input[name="text"]').count()) {
console.log('❌ Cookie die → bị redirect login');
this.logger.error('❌ Cookie die → bị redirect login');
throw new HttpException('❌ Không thấy nút retweet (tweet private?)', 500);
@@ -299,15 +385,16 @@ export class XBrowserService implements OnModuleInit, OnModuleDestroy {
await page.waitForTimeout(rand(1000, 5000));
await page.mouse.wheel(0, rand(300, 800));
await page.waitForTimeout(rand(4000, 8000));
await page.evaluate(() => window.scrollTo({top: 0, behavior: 'smooth'}));
await page.mouse.wheel(0, -2000);
await page.waitForTimeout(rand(1000, 2000));
await this.actLikeTweet(page);
// ===== CLICK RETWEET =====
let retweetBtn = page.locator('[data-testid="retweet"]');
if (!(await retweetBtn.count())) {
console.log('❌ Không thấy nút retweet (tweet private?)');
this.logger.error('❌ Không thấy nút retweet (tweet private?)');
throw new HttpException('❌ Không thấy nút retweet (tweet private?)', 500);
}
@@ -317,7 +404,7 @@ export class XBrowserService implements OnModuleInit, OnModuleDestroy {
try {
await page.locator('a[href="/compose/post"]').click({timeout: 2000});
} catch {
console.log('fallback → click by text');
this.logger.debug('fallback → click by text');
await page.locator('a[role="menuitem"]')
.filter({hasText: /Quote|Trích dẫn/i})
.click();
@@ -326,7 +413,7 @@ export class XBrowserService implements OnModuleInit, OnModuleDestroy {
// let quoteBtn = page.locator('[data-testid="retweetWithComment"]');
//
// if (!(await quoteBtn.count())) {
// console.log('❌ Không thấy nút quote');
// this.logger.debug('❌ Không thấy nút quote');
// return;
// }
//
@@ -343,7 +430,7 @@ export class XBrowserService implements OnModuleInit, OnModuleDestroy {
// const box = page.locator('div[role="textbox"]:visible').first();
if (!(await box.count())) {
console.log('❌ Không thấy textbox');
this.logger.error('❌ Không thấy textbox');
throw new HttpException('❌ Không thấy textbox', 500);
}
@@ -354,34 +441,34 @@ export class XBrowserService implements OnModuleInit, OnModuleDestroy {
// await box.scrollIntoViewIfNeeded();
// focus trước khi gõ
console.log('focus trước khi gõ')
this.logger.debug('focus trước khi gõ')
await box.click({delay: rand(50, 150)});
for (let char of content) {
await box.type(char, {delay: rand(50, 120)});
}
console.log('gõ quote xong ...')
this.logger.debug('gõ quote xong ...')
await page.waitForTimeout(rand(1000, 2000));
// ===== POST =====
let postBtn = page.locator('[data-testid="tweetButton"]');
console.log('count ...')
this.logger.debug('count ...')
if ((await postBtn.count())) {
console.log('click nút quote ...')
this.logger.debug('click nút quote ...')
await postBtn.click({timeout: 7000}).catch(async (e) => {
console.log('❌ Nut click khong duoc, thử dùng bàn phím Control+Enter');
this.logger.debug('❌ Nut click khong duoc, thử dùng bàn phím Control+Enter');
await page.keyboard.press('Control+Enter');
});
await page.waitForTimeout(rand(4000, 6000));
console.log('✅ Quoted thành công');
this.logger.debug('✅ Quoted thành công');
} else {
console.log('❌ Không thấy nút post, gọi Ctr + Enter');
this.logger.debug('❌ Không thấy nút post, gọi Ctr + Enter');
await page.keyboard.press('Control+Enter');
await page.waitForTimeout(rand(4000, 6000));
console.log('✅ Quoted thành công');
this.logger.debug('✅ Quoted thành công');
}
return {success: true, error: ''};
@@ -396,15 +483,15 @@ export class XBrowserService implements OnModuleInit, OnModuleDestroy {
async postReply(account: BrowserAccount, tweetUrl, content) {
if (!content) {
console.log(`Nội dung trả lời không có`);
this.logger.debug(`Nội dung trả lời không có`);
throw new Error('Nội dung trả lời không có');
}
// let ctx = await this.getOrCreateContext(account);
//
// console.log('ctx', ctx);
// this.logger.debug('ctx', ctx);
// if (ctx.isClosed()) {
// console.log('browser is closeed, reopen');
// this.logger.debug('browser is closeed, reopen');
// ctx = await this.getOrCreateContext(account, false);
// }
// const cookies = account.cookies.map((c) => ({
@@ -422,29 +509,38 @@ export class XBrowserService implements OnModuleInit, OnModuleDestroy {
// vào tweet
// ===== SAFE GOTO =====
try {
console.log(`Mo trang web tweetUrl`);
this.logger.debug(`Mo trang web tweetUrl`);
await page.goto(tweetUrl, {waitUntil: 'domcontentloaded', timeout: 30000});
} catch (e) {
console.log('❌ Load fail');
this.logger.debug('❌ Load fail');
throw e;
}
// đợi UI ổn
console.log(`đợi UI ổn...`)
this.logger.debug(`đợi UI ổn...`)
await page.waitForSelector('article', {timeout: 7000});
const isLoggedIn = await page
.locator('[data-testid="SideNav_AccountSwitcher_Button"], [data-testid="AppTabBar_Home_Link"]')
.first()
.isVisible()
.catch(() => false);
this.logger.debug(`postReply: ${isLoggedIn ? 'LOGGED IN' : 'LOGGED OUT'}`);
// scroll nhẹ
console.log(`scroll nhẹ ...`)
this.logger.debug(`scroll nhẹ ...`)
await page.mouse.wheel(0, 300);
await page.waitForTimeout(1000 + Math.random() * 2000);
await this.actLikeTweet(page);
// lấy textbox visible
const box = page.locator('div[role="textbox"]:visible').first();
await box.waitFor({state: 'visible', timeout: 7000});
// focus
console.log(`box focus ...`)
this.logger.debug(`box focus ...`)
await box.click();
// nhập content (fallback nếu type fail)
@@ -454,23 +550,23 @@ export class XBrowserService implements OnModuleInit, OnModuleDestroy {
} catch {
await box.fill(content);
}
console.log(`nhập nội dung xong ...`)
this.logger.debug(`nhập nội dung xong ...`)
await page.waitForTimeout(800 + Math.random() * 1200);
// nút reply
const btn = page.locator('[data-testid="tweetButtonInline"]:visible');
if (!(await btn.count())) {
console.log('❌ Không thấy nút reply');
this.logger.debug('❌ Không thấy nút reply');
throw new Error('Không thấy nút reply');
// return false;
}
await btn.click();
console.log(`nhấn nút gửi ...`)
this.logger.debug(`nhấn nút gửi ...`)
await page.waitForTimeout(3000);
console.log('✅ Reply OK');
this.logger.debug('✅ Reply OK');
return {success: true, error: ''};
} catch (err) {
this.logger.error(`Browser reply failed: ${err.message}`);
+9 -3
View File
@@ -1,7 +1,7 @@
// x-poster.controller.ts
import {Body, Controller, Get, HttpException, Post, Query, Req} from '@nestjs/common';
import {CreateTweetDto, ReplyTweetDto} from './dto/create-tweet.dto';
import {XPosterRouterService, XStrategy} from "./x-poster.router.service";
import {XPosterRouterService} from "./x-poster.router.service";
import {XCookieService} from "./x-cookie.service";
import {XApiService} from "./x-api.service";
import {XCacheService} from "../x-cache/x-cache.service";
@@ -107,8 +107,14 @@ export class XPosterController {
) {
}
@Get('verify')
verify() {
@Get('like')
async likeTweet(@Query('xurl') url: string) {
console.log('xurl==>', url);
if (!url) {
throw new HttpException('xUrl not found', 400);
}
await this.xBrowserService.likeTweet(url);
return 'done';
// const account = {
// authToken: process.env.X_COOKIE_AUTH_TOKEN!, // auth_token cookie
// ct0: process.env.X_COOKIE_CT0!,
+8 -3
View File
@@ -61,13 +61,17 @@ export class XPosterRouterService {
}
async verifyCookie(): Promise<any> {
this.logger.debug('==> Verify Cookie');
// const isAlive = await this.cookieSvc.verifyCookie();
const isAlive = await this.browserSvc.verifyCookie();
if (!isAlive) {
await this.xCacheService.setStateXCookiesIsDie();
await this.notifyService.sendUrgentMessageToTele('Cookie đã hết hạn vui lòng cập nhập để sử dụng.')
await this.notifyService.sendUrgentMessageToTele('Cookie đã hết hạn vui lòng cập nhập để sử dụng.')
}
await this.xCacheService.setStateXCookiesIsSillALive();
await this.notifyService.sendMessageToTele('✅Verify cookie pass')
return isAlive;
}
async canUseXCookies(): Promise<boolean> {
@@ -100,7 +104,7 @@ export class XPosterRouterService {
if (result.success) {
this.logger.log(`Đã đăng bài thành công`);
await this.notifyService.sendMessageToTele(`Đã đăng bài X thành công`);
// await this.notifyService.sendMessageToTele(`Đã đăng bài X thành công`);
return {
success: true,
tweetId: result.tweetId,
@@ -293,7 +297,8 @@ export class XPosterRouterService {
}
}
if (method === 'cookie' && account.cookie) {
return await this.cookieSvc.createTweet(account.cookie, text);
return {success: false, error: `Method ${method} not implemented`};
// return await this.cookieSvc.createTweet(account.cookie, text);
}
if (method === 'browser' && account.browser) {
return await this.browserSvc.postTweet(account.browser, text);