<commit_before>var express = require('express'),
    graph = require('fbgraph'),
    axios = require('axios'),
    fs = require('fs'),
    request = require('request');

var router = express.Router();

router.post('/fbSearch', (req, res) => {
  // Sets the FB app access token in "id|key" form in place of an access token
  const token = process.env.FB_KEY + "|" + process.env.FB_SECRET;
  graph.setAccessToken(token);
  graph.setAppSecret(process.env.FB_SECRET);
  graph.setVersion('2.10');

  // Gets first part of name to prevent name mismatches between yelp and graphAPI
  let name = req.body.data.name.split(" ")[0];
  let coords = req.body.data.coords;
  let imageURLS = [];

  var searchOptions = {
    q: name,
    type: 'place',
    center: coords,
    distance: 500
  }

  let idResult;
  graph.search(searchOptions, (err, r) => {<commit_msg>Added change to fbSearch, if name is cafe switch to second word. This is for you, Cafe Vine and Cafe de Cupping, you conjoined twins you.<commit_after>var express = require('express'),
    graph = require('fbgraph'),
    axios = require('axios'),
    fs = require('fs'),
    request = require('request');

var router = express.Router();

router.post('/fbSearch', (req, res) => {
  // Sets the FB app access token in "id|key" form in place of an access token
  const token = process.env.FB_KEY + "|" + process.env.FB_SECRET;
  graph.setAccessToken(token);
  graph.setAppSecret(process.env.FB_SECRET);
  graph.setVersion('2.10');

  // Gets first part of name to prevent name mismatches between yelp and graphAPI
  let name = req.body.data.name.split(" ")[0];
  if (name.toLowerCase() == "cafe") {
    name = req.body.data.name.split(" ")[1];
  }
  let coords = req.body.data.coords;
  let imageURLS = [];

  var searchOptions = {
    q: name,
    type: 'place',
    center: coords,
    distance: 500
  }

  let idResult;
  graph.search(searchOptions, (err, r) => {
{'fraction_non_alphanumeric': 0.14830287206266318, 'fraction_numerical': 0.007832898172323759, 'mean_word_length': 3.5295508274231677, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 0, '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': '7211968', 'n_tokens_mistral': 657, 'n_tokens_neox': 633, 'n_words': 183}