How can a database-less application be aware of whether the current user of application has already given permission to this application, or whether they are a first time user?
I simply redirect to a Facebook URL, and then if they are a new user Facebook shows the permission dialog box to the user, and if not then Facebook simply redirects to my URL.
You must check a signed_request in php: