I have canvas FBML app for facebook in Java. I am trying to get current user id using facebook java api in a controller, but without forcing every user to grand app access through facebook.com/login.php.
The trouble is that I don't understand a facebook app workflow. In order to get userid I need to provide fb sessionid. In order to get session it seems like I have to forward all users to http://www.facebook.com/login.php?api_key=... which will prompt them for extra permissions. The thing is I don't want to force everyone to give me extra permissions or to be logged in. Guests should be also able to use the app with limited functionality.
How do I separate guests and those who didn't give me permissions from the rest without redirecting everyone without session to permissions page all the time?
Thanks.