Flatpak is installed in Fedora (at least for version 25 and 26) so you don’t need to install it. You can read more about Flatpak here.
We will install everything as a user, without using root.
The Flatpak application is hosted on Github, you can check it here: https://github.com/alexlarsson/spotify-app
To install Spotify, just use a single command:
flatpak --user install --from https://s3.amazonaws.com/alexlarsson/spotify-repo/spotify.flatpakref
The installer will ask you if you want to add some additional Gnome libraries, required for Spotify installation.
Just for an example, my installation process:
[eshlox@eshlox ~]$ flatpak --user install --from https://s3.amazonaws.com/alexlarsson/spotify-repo/spotify.flatpakrefThis application depends on runtimes from: http://sdk.gnome.org/repo/Configure this as new remote 'gnome' [y/n]: yInstalling: com.spotify.Client/x86_64/masterRequired runtime for com.spotify.Client/x86_64/master (org.gnome.Platform/x86_64/3.24) is not installed, searching...Found in remote gnome, do you want to install it? [y/n]: yInstalling: org.gnome.Platform/x86_64/3.24 from gnome[####################] 9 delta parts, 86 loose fetched; 189320 KiB transferred in 38 secondsInstalling: org.gnome.Platform.Locale/x86_64/3.24 from gnome[####################] 3 metadata, 1 content objects fetched; 13 KiB transferred in 3 secondsInstalling: com.spotify.Client/x86_64/master from com.spotify.Client-origin[####################] Downloading: 97.2 MB/97.2 MB (10.8 MB/s)
We can check if Spotify is installed.
[eshlox@eshlox ~]$ flatpak listRef Optionscom.spotify.Client/x86_64/master user,currentorg.gnome.Platform.Locale/x86_64/3.24 user,runtime,partialorg.gnome.Platform/x86_64/3.24 user,runtime
I don’t know why but the Spotify icon is accessible after system restart, but it works ;-)
You can also run Spotify from the command line.
flatpak run com.spotify.Client