I just happened to purchase BetterTouchBar and I am thoroughly enthused by the seemingly limitless customisation options. I realise the Spotify widget seems to be extremely popular around here, and so I would like to share mine with you all. I used a combination of my own code, and a few lines from Vas3k and GoldenChaos. Thank you so much for sharing your codes.
Anyway, here is my Spotify widget. Please let me know how I might improve this nifty little thing!
Tap - Toggles play or pause
Long press (playing) - Plays the next song
Long press (paused) - Opens Spotify
If "Artist - Song Title" exceeds 30 characters, it will only display the song title
If the song title itself exceeds 30 characters, it will display the first 27 characters and leave a "..." at the end.
It also displays the cover art of the current song, or the Spotify application icon when the player is paused.
Edit: In order to activate the trigger that plays the next song, create a new trigger and set its action to run an AppleScript. Copy and paste this into the editor and you should be good to go
if application "Spotify" is running then
tell application "Spotify"
if player state is playing then
tell application "Spotify" to next track
tell application "Spotify" to activate