How to print a flag in a block programmatically?
You are adding raw PHP code as block content; you should execute it directly instead.

Try this:

$block['content'] .= flag_create_link('mymodule_interested', $node-&gt;nid);




UPDATE

You were using Flag API v1, instead of v2. Below is the full code:

function get_involved_block_info() {
  $blocks = array();
  $blocks['get_involved_block'] = array(
    'info' =&gt; t('Get involved block'), 
    'weight' =&gt; 10,   
  );

  return $blocks;
}

function get_involved_block_view($delta) {
  $block = array();
  switch ($delta) {
    case 'get_involved_block':
      global $user;
      $node = menu_get_object();
      // First of all, if the user is the author, do not show this node.
      if ($node &amp;&amp; $node-&gt;uid != $user-&gt;uid) {
        $block = array();
        $block['subject'] = t('Get involved');
        $block['content'] = flag_create_link('get_involved_interested', $node-&gt;nid);

        return $block;
      }
    break;
  }
}

function get_involved_flag_default_flags() {
  $flags = array();
  // Exported flag: "Interested".
  $flags['get_involved_interested'] = array(
    'entity_type' =&gt; 'node',
    'title' =&gt; 'Interested',
    'global' =&gt; false,
    'types' =&gt; array(
      0 =&gt; 'ad',
    ),
    'flag_short' =&gt; 'Join',
    'flag_long' =&gt; 'I want to join',
    'flag_message' =&gt; 'Your interest was registered',
    'unflag_short' =&gt; 'Cancel',
    'unflag_long' =&gt; 'Cancel my interest',
    'unflag_message' =&gt; 'Your interest was deleted',
    'unflag_denied_text' =&gt; '',
    'link_type' =&gt; 'toggle',
    'weight' =&gt; 0,
    'show_on_teaser' =&gt; false,
    'show_on_form' =&gt; true,
    'status' =&gt; false,
    'locked' =&gt; array(
      'name' =&gt; 'name',
      'types' =&gt; 'types',
      'global' =&gt; 'global',
    ),
    'module' =&gt; 'get_involved',
    'api_version' =&gt; 3,
    'import_roles' =&gt; array(
      'flag' =&gt; array(),
      'unflag' =&gt; array(),
    ),
    'show_in_links' =&gt; array(
      'full' =&gt; true,
    ),
  );

  return $flags;
}