I have an error when I used a variable in the properties of http request body. When I do not use the variable it is working fine.
This is the the json without a variable which working fine and post a tweet. I get this from twitter api documentations.
{“text”: “Hello World”, “media”: {“media_ids”: [“1111111111111111111”]}}
And this is the code with a variable:
“{”“text”“: “”” + strTweet.ToString + “”“,”“media”" {““media_ids””: [“”“+ mediaId.ToString +”“”]}}"
And this is the error response:
{“errors”:[{“message”:“Request body is not valid JSON.”}],“title”:“Invalid Request”,“detail”:“One or more parameters to your request was invalid.”,“type”:“Twitter API Response Codes & Error Support | Twitter Developer Platform”}