I want to include the facebook JSSDK only on pages where I want to use it. On the facebook dev site it sais that ideally its included right after the opening body tag, which sits in header.php
My thought was to add in header.php
<?php do_action( 'topofthetop'); ?>
right after the opening body tag.
And then later (in comments.php just before
<?php if ( have_comments() ) : ?>), if I need to call
add_action( 'topofthetop', array('someclass','FB_JS_SDK') );
FB_JS_SDK simply echoes the code needed to included the FB-JSSDK. But the code doesn't appear after the body tag. I guess because header.php is allready output before my add_action call?
How could I solve this?