# Rest_Controller::viewer_can_view_post()

Whether a viewer may read a post, by ID (used by the shared reactions service for posts and comments).

```php
viewer_can_view_post( int $post_id, int $viewer_id ): bool
```

## Parameters

- `$post_id` (int) Social post ID.
- `$viewer_id` (int) Viewer user ID (0 if logged out).

## Return

`bool` 

## Changelog

| Version | Description |
| --- | --- |
| 1.6.2 | Introduced |
