Pandora and spotify pauses on iPhone 5?

I have an iPhone 5 and when ever I'm using pandora or spotify and i try getting on twitter the music will stop playing. Is this suppose to happen? How do I fix it? It only pauses when I get on the twitter app though

As a general rule, the music should only stop if new music starts playing. Maybe there's music coming from the twitter app, though i can't imagine that happening unless maybe a vine is open and playing on mute or something. Most likely its just a glitch. You can try turninng the phone off and on again, or delete and reinstall twitter (and/or the other apps)