Using the API “query a post” here: Amity API
I provide the Token
(my admin token), and the targetId
of the post, and the targetType
(which I assume is “content”),
I always get an empty object back:
200 OK
{
"posts": [],
"postChildren": [],
"comments": [],
"users": [],
"files": [],
"communities": [],
"categories": [],
"communityUsers": [],
"feeds": [],
"videoStreamings": [],
"polls": [],
"paging": {}
}
Is there a parameter I’m required to fill in that I am not filling in? I only fill in targetId
, and targetType
(content).
Hello, we recommend that you use our official API documentation available at Amity API.
Regarding posts, our API currently only allows you to query for user or community feeds (targetType), and the targetId will correspond to the userId or communityId.
Note: currently, the content type is not available, so it may not be fully functional.
Just to confirm, there is no way to get a post’s full data given a postId
? Is querying for posts not functional?
We use Amity as a social platform in our app. When a user comments on a post, we want users to be able to click that notification and go to the post itself, so they can see what the comment was.
From the comment’s data, I can obtain the postId
that the comment is referring to, but I can’t achieve my desired behaviour if I, then, cannot query a post given its postId
, and therefore, cannot load the post.
To get post detail by id, should be this api: Amity API
1 Like