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
             
            
              
              
              
            
            
           
          
            
            
              Did you find a solution? Seeing the same issue…
             
            
              
              
              
            
            
           
          
            
            
              need to add track_visit + forceLoad as query params when loading the topic like this:
https://xxx.discourse.org/t/1026.json?track_visit=true&forceLoad=true
             
            
              
              
              1 个赞