Twitter API examples & templates
Use these vals as a playground to view and fork Twitter API examples and templates on Val Town. Run any example below or find templates that can be used as a pre-built solution.
andreterron
actuallyItsXBot
Actually, It's π An annoying bot that corrects people about the new name of the app previously known as Twitter. Follow it on π ! The Twitter β π transition is pretty painful, and this bot is here to make things even worse! Want to create your own bot? Check out https://www.val.town/v/andreterron.twitter
Script
jdan
myspace
Create your own Myspace profile, deployed to Val town. https://jdan-myspace.web.val.run Click "..." and select Fork to create your own. From there you can: Customize your own profile Or post on my wall by appending to messages and sending me a pull request
HTTP
socialdata
twitterNewFollowingAlert
Twitter/π - New user following alert [TEMPLATE] SocialData Monitoring API provides an easy way to get nearly real-time notifications when any Twitter user follows someone.
Use this Val template to deliver notifications to Discord or Telegram. Example Prerequisites SocialData account Set Up 1. Fork this Val To use this template, fork this Val in the top right corner of this page. 2. Update Environment Variables You don't need to change any code - this template works as-is, and only requires a few environment variables in order to deliver your notifications to Discord or Telegram. Open Val.town environment variables page and create the following variables: DISCORD_WEBHOOK_URL - required when using Discord for notifications TELEGRAM_API_TOKEN - required when using Telegram for notifications TELEGRAM_USER_ID - required when using Telegram for notifications You don't have to set up both Discord and Telegram at the same time. Either is required for this Val to work, but you may set up both at the same time. Not sure where to get these? Scroll down to FAQ section below. 3. Create Your Monitor Open SocialData monitors page and create your monitor. Use your Val URL as the webhook URL of your new monitor: 4. Wait for Your Notification That's it! When the user you are monitoring follows someone - SocialData and val.town will handle the rest and deliver your notification to Discord or Telegram. FAQs Where do I get Discord webhook URL? Follow this guide to create a Discord webhook URL. Where do I get Telegram bot API token and User ID? Follow this guide to create your own Telegram bot and obtain it's API token. Add @userinfobot and the bot will reply with your ID whenever you add it (Click Start or type /start ) Can I use the same Discord / Telegram settings for multiple monitors? Yes! You can send notifications from multiple monitors and even different monitor types using the same Discord webhook or Telegram bot token. Check out our other webhook handlers on val.town: New tweet notifications Profile update notifications New followed account notifications
HTTP
socialdata
twitterProfileUpdatedAlert
Twitter/π - Twitter profile update alert [TEMPLATE] SocialData Monitoring API provides an easy way to get nearly real-time notifications when any Twitter user updates their profile.
Use this Val template to deliver notifications to Discord or Telegram. Example Prerequisites SocialData account Set Up 1. Fork this Val To use this template, fork this Val in the top right corner of this page. 2. Update Environment Variables You don't need to change any code - this template works as-is, and only requires a few environment variables in order to deliver your notifications to Discord or Telegram. Open Val.town environment variables page and create the following variables: DISCORD_WEBHOOK_URL - required when using Discord for notifications TELEGRAM_API_TOKEN - required when using Telegram for notifications TELEGRAM_USER_ID - required when using Telegram for notifications You don't have to set up both Discord and Telegram at the same time. Either is required for this Val to work, but you may set up both at the same time. Not sure where to get these? Scroll down to FAQ section below. 3. Create Your Monitor Open SocialData monitors page and create your monitor. Use your Val URL as the webhook URL of your new monitor: 4. Wait for Your Notification That's it! When the user you are monitoring updates their profile - SocialData and val.town will handle the rest and deliver your notification to Discord or Telegram. FAQs Where do I get Discord webhook URL? Follow this guide to create a Discord webhook URL. Where do I get Telegram bot API token and User ID? Follow this guide to create your own Telegram bot and obtain it's API token. Add @userinfobot and the bot will reply with your ID whenever you add it (Click Start or type /start ) Can I use the same Discord / Telegram settings for multiple monitors? Yes! You can send notifications from multiple monitors and even different monitor types using the same Discord webhook or Telegram bot token. Check out our other webhook handlers on val.town: New tweet notifications Profile update notifications New followed account notifications
HTTP