If you're an analyst for the network, then obviously you get paid. But say you're a professor of middle-eastern politics and you're invited to come on as a guest, then you don't. At least this is how it typically is, i had a psych professor that made the rounds of network news, and he didn't get paid.
You also don't get paid even if you're THE story of 20/20 (ie like Monica Lewinsky when she appeared) or Dateline.