JSFiddle - React, Tailwind, and code Playground

JavaScript

function getCover(callback, userid) {
     $.ajax({
         url: 'https://graph.facebook.com/' + userid + '?fields=cover',
         success: callback
     });
 }

 function doWithCover(data) {
     /** Do everything you need with your data */
     alert(data.cover.source);
 }

 getCover(doWithCover, '19292868552');