@patrick, thank you. I have made that change and have encountered a new error.
When I go to the test page and click on the new button, it takes me to Facebook, I log in, and then the pop up with the permissions pops up. After confirming the permissions, it takes me back to my site, but this error occurs:
On refreshing the page, the redirect in the server action occurs, but the insert does not occur and I get a message that says Unauthorized.
Here is my server action: