a user need to be logged in your app in order for you to get his ID (the most basic permission).
For this, you can use the Javascript SDK, or you can link to a login page using the PHP SDK getLoginUrl
https://developers.facebook.com/docs/reference/php/facebook-getLoginUrl/
For anything related to a user on the OpenGraph or the Graph API, you at least need him to be logged into your app, and this mean you need to ask user basic permission. Until then, the user is completly anonymous to your app.
You can use the /me
alias to simplify requesting the Graph API, but you still need a valid access_token
provided by asking basic permissions. Until then, /me
or /{{id}}
will not return anything.