how can i check in javascript if user has granted my site the publish stream permission
?
The API method you're looking for is Users.hasAppPermission. You could call it directly from JavaScript, but it will probably be more efficient to write your own HTTP method, that calls it via API and returns "true" or "false" via JSON.
There is also a filed bug (13378) that Users.hasAppPermission has no Graph API equivalent.