I had same issue, After long time of trying to figure out what the issue is,
I found that you need access token to get user ID.
To get access token form the signed_request, user must authorize (to get permissions) you app firstly.
I hope this will help