This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const puppeteer = require('puppeteer'); | |
(async() => { | |
// Step 1: launch browser and open a new page. | |
const browser = await puppeteer.launch(); | |
const page = await browser.newPage(); | |
// Step 2: PPTR.DEV has a service worker \m/ | |
// Go there and wait for SW to register. | |
await page.goto('https://pptr.dev/'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// This code requires that you set the ID of the tweet that you want to Like as an input variable called "tweet_id". Learn more at https://zapier.com/help/code/#data-variables | |
// INSTUCTIONS FOR SETTING THESE REQUIRED VARIABLES: After you create a new app at https://apps.twitter.com/, click on the name of the app to open it. Then, select the "Keys and Access Tokens" tab. | |
var twitterApplicationConsumerKey = ''; // Located in the "Application Settings" section | |
var twitterApplicationConsumerSecret = ''; // Located in the "Application Settings" section | |
var twitterApplicationAccessToken = ''; // Located in the "Your Access Token" section | |
var twitterApplicationAccessTokenSecret = ''; // Located in the "Your Access Token" section | |