HTTP headers are different than the HTML head. The meta tag you're looking to add (for the Twitter card) is actually a meta tag that gets place in the HTML head.
So to achieve exactly what you're looking to do from a PHP "functions" file, you'd want to hook into wp_head instead. Like this:
echo '<meta name=&...