Generating extension menu when extension is installed
It's strongly recommended you use the navigationMenu hook in your extension.php file.

function civisocial_civicrm_navigationMenu( &amp;$params ) {
    $maxKey = ( max( array_keys($params) ) );
    $params[$maxKey+1] = array (
        'attributes' =&gt; array (
            'label'      =&gt; 'Civisocial',
            'name'       =&gt; 'Civisocial',
            'url'        =&gt; null,
            'permission' =&gt; null,
            'operator'   =&gt; null,
            'separator'  =&gt; null,
            'parentID'   =&gt; null,
            'navID'      =&gt; $maxKey+1,
            'active'     =&gt; 1
    ),
        'child' =&gt;  array (
            '1' =&gt; array (
                'attributes' =&gt; array (
                    'label'      =&gt; 'Settings',
                    'name'       =&gt; 'Settings',
                    'url'        =&gt; "civicrm/admin/setting/preferences/civisocial"
                    'operator'   =&gt; null,
                    'separator'  =&gt; 1,
                    'parentID'   =&gt; $maxKey+1,
                    'navID'      =&gt; 1,
                    'active'     =&gt; 1
                ),
                'child' =&gt; null
            ) 
        ) 
    );
}


This will add a entry Civisocial in your navigation table along with a child called Settings.