Skip to content
This repository has been archived by the owner on Feb 24, 2022. It is now read-only.

Messenger/Spotify integration for playlist/queue modifications

License

Notifications You must be signed in to change notification settings

sirstudly/SpotifyJukebox-old

Repository files navigation

Spotify Jukebox

This simple Node.js application is a demonstration of how to use the Facebook Messenger and Spotify APIs together to create a 'Jukebox Bot'.

Update 2019-11-23

This fork updates the original version which uses a custom "playlist" with one that does a true "queue" operation without altering the current playlist on Spotify. There is also a "What's playing?" command which shows the complete list of queued songs. There is no API call for this so we emulate the WSS handshake the Spotify web player uses and listen for change events.

Note, due to licensing restrictions on the integrated web player, this doesn't work on Linux distributions since it uses Chromium rather than Chrome.

.env variables

The included .env file contains placeholder keys which you will need to provide. For more information about what these mean and how to obtain them, please see the associated tutorial at https://medium.com/p/70c863337331

Installation

curl -X POST \
  'https://graph.facebook.com/v9.0/me/messenger_profile?access_token=<FILL IN ACCESS TOKEN HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "get_started": {
        "payload": "{\"command\": \"GET_STARTED\"}"
    },
    "greeting": [
        {
            "locale": "default",
            "text": "Hi {{user_first_name}}! Just start typing your request and we'\''ll see what we have in our catalogue."
        }
    ],
    "persistent_menu": [
        {
            "locale": "default",
            "call_to_actions": [
                {
                    "type": "postback",
                    "title": "What'\''s playing?",
                    "payload": "{\"command\": \"STATUS\"}"
                }
            ]
        }
    ]
}'

About

Messenger/Spotify integration for playlist/queue modifications

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published