This function is provided by cyREST developpers and converts an igraph object into a JSON object for Cytoscape.
An object of class igraph
A JSON object compatible for Cytoscape
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.