I have a database full of places with the facebook page id's. I'd like to map them to the corresponding foursquare venue id with the factual api.
The problem is when I try to issue a request and set the namespace id to the facebook id all I get back is the entry that factual has with the factual_id and facebook id but not any other third party places with the same factual id.
What I'm doing now is saving the factual id, and then sending another request given the factual_id which returns all the crosswalk entries then I can look for the foursquare one. Is there anyway to do this request in 1 step?
Using php here is the code.
The place variable is a object that is basically mapped to a facebook page
$place = Model_Place::find(42);
$factual = new \Factual(\Config::get('factual_oauth_key'), \Config::get('factual_oauth_secret'));
$query = new \FactualQuery;
$query->limit(1);
$query->field("namespace")->equal("facebook");
$query->field("namespace_id")->equal($place->page_id);
$res = $factual->fetch("crosswalk", $query);
$data = $res->getData();
echo "<pre>";
print_r($data);
echo "</pre>";