<<Code JS>>
yam.config({appId: "APP ID"});
    yam.getLoginStatus(
            function(response) {
                if (response.authResponse) {
                    var finalObject;
                    yam.request({
                        url: "https://www.yammer.com/api/v1/users/current.json",
                        method: "GET",
                        dataType: "json",
                        success: function (data) {
                           init(data); //Appel de notre fonction Graph
                        },
                        error: function(xhr2, status2) {
                            alert(xhr2.status);
                        }
                    });
                }
                else {
                    alert("not logged in")
                }
            }
    );
<</CodeJS>>

<<CodeJS>>
function init(paramdata){
    // init data
    var adj=[];
    for (var i=0; i< paramdata.web_preferences.home_tabs.length; i++)
    {
        adj.push(  paramdata.web_preferences.home_tabs[i].name );
    }
    var json =[
        {
            //root
            id:paramdata["id"],
            name:paramdata["first_name"],
            data:{
                "$color": "#557EAA",
                "$type": "image",
                "$url":paramdata["mugshot_url"]
            },
            //dépendences
            "adjacencies": adj

        }];
// suite du code
}
<</CodeJS>>

<<CodeJS>>
$jit.ForceDirected.Plot.NodeTypes.implement({
    'image': {
        'render': function(node, canvas){
            var ctx = canvas.getCtx();
            var pos = node.pos.getc(true);
            if( node.getData('image') != 0 ){
                var img = node.getData('image');
                ctx.drawImage( img, pos.x-15, pos.y-15);
            }
        },
        'contains': function(node,pos){
            var npos = node.pos.getc(true);
            dim = node.getData('dim');
            return this.nodeHelper.circle.contains(npos, pos, dim);
        }
    }
});
<</CodeJS>>