Looks like you got some type of authentication blocking on your API, haven’t seen this before on other, do you have any custom code hooked into the API?
nope, I just installed all plugins, activated them, created a chat room and viewed the page. Could this be caused by the hosting? I’m using Siteground
So, I played a bit with the plugin and especially the WP REST API and I’ve narrowed it down to the fact the REST API is not even seeing the chat room posts. If you simply browse to
http://snminteractive.com/gamtalk/wp-json/wp/v2/posts/
You see all the normal posts but not the custom (chatroom) posts.
Any idea?
I know what it is now, v2 of the api. I need to add in a custom endpoint for the Custom Post Type.
I’ll try to get new version up with a fix asap.
Thanks Roy,
You are spot on. I downgraded the rest api plugin to 1.2.3 and now it;s all working. I also found a note that says with the latest rest api, you need to add ‘show_in_rest’ => true when registering your custom post type.
On the other hand, I would love to add timestamp and avatar image for each chat message. I’m comfortable with php and jQuery, so if you could give me some guides, I would love to do it and contribute back for other peeps.
Regards
SD
@svetoslavd79 just updated to v3 which fixes the api v2 issues.
Feel free to fork and update submit a PR –
https://github.com/royboy789/wordpress-firebase-chat
if you contribute I’ll add you as an author in the WP repo version.