Skip to content

Commit

Permalink
remove whitespace from FQL statements
Browse files Browse the repository at this point in the history
  • Loading branch information
euclio committed May 13, 2014
1 parent e4d46c5 commit c97a75f
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/FBGraph.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -192,18 +192,18 @@ std::string FBGraph::get_endpoint_for_permission(const std::string &permission)
}

std::string FBGraph::get_uid_from_name(std::string name) {
std::string fql = "SELECT id FROM profile WHERE id IN \
(SELECT uid2 FROM friend WHERE uid1 = me()) \
AND name = \"" + name + "\"";
std::string fql = "SELECT id FROM profile WHERE id IN "
"(SELECT uid2 FROM friend WHERE uid1 = me()) "
"AND name = \"" + name + "\"";
json_spirit::mObject response = fql_get(fql);

// FIXME: Code assumes unique names for now
return response.at("data").get_array()[0].get_obj().at("id").get_str();
}

std::set<std::string> FBGraph::get_friends() {
std::string fql = "SELECT name FROM profile WHERE id IN \
(SELECT uid2 FROM friend WHERE uid1 = me())";
std::string fql = "SELECT name FROM profile WHERE id IN "
"(SELECT uid2 FROM friend WHERE uid1 = me())";
json_spirit::mObject response = fql_get(fql);
json_spirit::mArray friends_list = response.at("data").get_array();
std::set<std::string> friends;
Expand Down

0 comments on commit c97a75f

Please sign in to comment.