Skip to content
This repository has been archived by the owner. It is now read-only.
🎶 a Facebook Messenger bot for managing your party playlist with guests
Branch: dev
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

Facebook Chatbot with Spotify Integration

Deployed with Inertia Build Status Coverage Status

Table of Contents

Current Features

  • users can become hosts: the app logs into Spotify, creates a new playlist and assigns the host a passcode
  • other users can request for a song to be added to a host's playlist using the host's passcode, or cancel their request
  • hosts can preview requested songs and approve them, which adds the song to the playlist and notifies the requester
  • search for songs
  • listen to 30-second previews, if available




This guide will walk you through how to deploy your own instance of this bot on Heroku for your Facebook page.

Clone the repository first:

git clone
Part 1: Heroku
  1. Make an Heroku account and install Heroku tools from
  2. Install Node from
  3. CD into your cloned repository and install the project's dependencies:
    npm install
  4. Set up a new Heroku instance
    heroku create
  5. Make sure you set the URI of your Heroku instance as well:
    heroku config:set HEROKU_URI=your-heroku-uri
Part 2: Facebook
  1. Create a Facebook page for your app at
  2. Click on "Messenger" under "Products". Generate a token under "Token Generation", and set up Webhook under "Webhooks". Use the URL of your Heroku server as your webhook URL (append "/webhook/" to the end)
  3. Save as Config Variables on Heroku
    heroku config:set FB_REDIRECT_URI=your-redirect-uri
    heroku config:set FB_TOKEN=your-fb-token
Part 3: Spotify
  1. Create a Spotify application at!/applications
  2. Go to your application settings and add the URL of your Heroku server as your redirect URI (append "/callback/" to the end). Also take note of your Client ID and Client Secret.
  3. Save as Config Variables on Heroku
    heroku config:set SPOTIFY_CLIENT_ID=your-client-id
    heroku config:set SPOTIFY_CLIENT_SECRET=your-client-secret
    heroku config:set SPOTIFY_REDIRECT_URI=your-redirect-uri
Part 4: Deploy!

With all this set up, you should be good to go! Deploy the bot to your Heroku instance: git push heroku dev:master Now you can message your Facebook page to try out the bot. Note that until your application gets submitted for review and accepted, other users will have to be added as testers before the bot will respond to them.

You can’t perform that action at this time.