afrin
(Afrin)
1
I tried using the below API to like a post:
POST : baseUrl/post_actions
Body - {"id": 123,"post_action_type_id": 2,"flag_topic": false}
When I call latest.json, the response has liked: null for the post which is liked.
When I like the same post from Discourse Web UI, I am able to get liked: true in latest.json.
Am I missing something in the above LIKE API that I am using? I just tried to replicate the API called from Discourse Web UI.
「いいね!」 2
Falco
(Falco)
2
Are you requesting the /latest.json as an authenticated user with the auth headers?
Are you liking the OP ?
「いいね!」 4
afrin
(Afrin)
3
Yes I am requesting /latest.json as an authenticated user with auth headers
解決策は見つかりましたか?同じ問題が発生しています…
トピックを読み込む際に、次のように track_visit と forceLoad をクエリパラメータとして追加する必要があります。
https://xxx.discourse.org/t/1026.json?track_visit=true&forceLoad=true
「いいね!」 1