Si vous voulez inclure plusieurs instances de GraphComment sur la même page,
vous pouvez utiliser le code suivant :
<div id="graphcomment-1"></div>
<div id="graphcomment-2"></div>
<script type="text/javascript">
window.gc_ready = function() {
window.graphcomment({
graphcomment_id: 'website_id_1',
target: document.getElementById('graphcomment-1'),
});
window.graphcomment({
graphcomment_id: 'website_id_2',
target: document.getElementById('graphcomment-2'),
});
};
/* - - - DON'T EDIT BELOW THIS LINE - - - */
(function() {
var gc = document.createElement('script'); gc.type = 'text/javascript'; gc.async = true;
gc.src = 'https://graphcomment.com/js/integration.js';
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(gc);
})();
</script>
En utilisant le paramètre `target`, vous pouvez définir dans quel élément HTML GraphComment sera rendu.