Code Monkey home page Code Monkey logo

liked-on-youtube's Introduction

liked-on-youtube

Post "Liked on YouTube: ..." to X.

Install

NOTE: Google Apps Script must be run with the same Google account as YouTube's

1. Apply for a twitter developer account

Authentication is required to tweet from third party clients.

  1. Apply for a developer account from here
  2. Create a project and app
  3. Set up "User authentication settings"
    The "Callback URI" will be set later, so any URL is fine.
  4. Note down "Client ID" and "Client Secret"

2. Enable the Google Apps Script API

Go to https://script.google.com/home/usersettings and turn "On" the toggle.

3. Push application code to Google Apps Script

$ git clone https://github.com/ahuglajbclajep/liked-on-youtube.git .
$ npm i
$ npx clasp login # Use the same account as in step 2

# Replace "YOUR_*" with the ID and Secret you note down in step 1
$ sed -ie s/X_CLIENT_ID/YOUR_X_CLIENT_ID/ src/post.ts
$ sed -ie s/X_CLIENT_SECRET/YOUR_X_CLIENT_SECRET/ src/post.ts
$ npm run deploy

4. Connect your application to your X account

  1. Open the Google Apps Script project page
    e.g. npx clasp open
  2. Create a new deployment as a Web app (for everyone)
  3. Note down the Web app URL
  4. Replace the "Callback URI" set in step 1 with the Web app URL
  5. Open your browser in incognito mode and log in to X
  6. Open another tab in the browser in incognito mode and access the Web app URL
  7. If all goes well, the connection to X is complete
    Once connected, the application will work even if you archive deployments.

5. Start scheduled execution

  1. Open the Google Apps Script project page
  2. Open index.gs and run the "main" function
  3. If there is an update, videos will be posted to X every hour.

License

MIT

liked-on-youtube's People

Contributors

ahuglajbclajep avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.