Need help? Check out Spotify Answers for solutions to a wide range of topics.
The song will be shared to the activity feed if it has been listened to for at least 30 seconds. If 30 seconds or more of the song has been played, it will be shared to the activity feed after the user skips or goes to the next song. So it would be shared at the end of the song.