I had the same problem and this post really helped me http://facebook.stackoverflow.com/a/8502709/965536
The only difference of my problem was that I used the PHP SDK, but essentially it works the same. I used api call
$permissions = $facebook->api('/me/permissions');
Then you can do your checks
if(isset($permissions['data'][0]['publish_stream']) && $permissions['data'][0]['publish_stream'])
This works for me, but someone may have a better answer. You should also wrap your publish publish stream in try catch
Hope this helps.
thanks
Richard Merchant
source share