<?php

////// INITIALIZATION //////
require_once __DIR__ . "/../cowitter/vendor/autoload.php";
require_once __DIR__ . "/fb_consts.php";
require_once __DIR__ . "/fb_api_tools.php";
require_once __DIR__ . "/fb_api_calls.php";
$facebook = new \Facebook\Facebook(FB_SETUP);
////// end INITIALIZATION //////

/**
 * @param $input_id
 * @param $api_request_type
 * @return array
 */
function get_data($input_id, $api_request_type){
    global $facebook;
    $request_called = REQUEST_TYPES[$api_request_type];
    $request_string = build_request_string($input_id, $request_called["edgeName"], $request_called["fieldsArr"], $request_called["subFieldsArr"]);
    return perform_query($facebook, FB_SETUP, $request_string, $request_called["conversionFnName"]);
};


