title: iOS and SQL: Restricting access
body: <p>Bit of a broad question here. I want to host an SQL database to store user data from an iOS based app. I want to save data using the users facebook ID. Now, from the app, I want to be able to query the database but only retrieve the users fb ID and friends of the users IDs (I'll have gotten permission to share their data with friends). From inside the app, this isn't a problem as I can just only query using those IDs, but, whats to stop someone from querying my database from outside the app?</p>
  
  <p>So I guess my question is, how can I restrict access of the SQL database to queries generated from the app itself rather than a simple web browser or tech savvy terminal user who has somehow gotten a hold of the link to the database? User privacy is obviously very important.</p>