<commit_before>import jsonToQueryString from 'utils/jsonToQueryString'

export default function fbapi (path, queryParams, callback) {
  return fetch(
    `https://graph.facebook.com/v2.8/${ path }?${ jsonToQueryString(queryParams) }&access_token=${ process.env.FACEBOOK_ACCESS_TOKEN }`,
    {
      method: 'GET',
      headers: {
        'Content-Type': 'application/json'
      }
    }
  ).then(
    response => response.json()
  ).then(
    callback
  )
}<commit_msg>Make facebook api calls simple http requests.<commit_after>import jsonToQueryString from 'utils/jsonToQueryString'

export default function fbapi (path, queryParams, callback) {
  return fetch(
    `https://graph.facebook.com/v2.8/${ path }?${ jsonToQueryString(queryParams) }&access_token=${ process.env.FACEBOOK_ACCESS_TOKEN }`,
    { method: 'GET' }
  ).then(
    response => response.json()
  ).then(
    callback
  )
}
{'fraction_non_alphanumeric': 0.14109742441209405, 'fraction_numerical': 0.004479283314669653, 'mean_word_length': 3.8324324324324324, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3469277', 'n_tokens_mistral': 284, 'n_tokens_neox': 283, 'n_words': 59}