How to keep Iphone 5 from jumping to the appstore?

Hi, when I'm on the Facebook app or some websites my iPhone will take me out of wherever I'm and jump to the appstore to try to get me to download some dumb app. I've enabled the pop up blocker for safari, but is there anyway to stop the Facebook app from doing it? It's every time I go to a new page and it's getting extremely frustrating.

Go into setting on net and pone settings to stop the pop ups