You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Getting an IllegalArgumentException when deserializing JSON response to create tweet. It looks like the TweetCreateResponseData class doesn't contain fields present in the create tweet response JSON since Sept 20, 2022:
By default, the Tweet object only returns the id and the text fields, and for Tweets created since September 29, 2022, the edit_history_tweet_ids field.
Expected behavior
CreateTweetRequest instance is created and populated with tweet information from the JSON response to create a tweet.
Actual behavior
Getting an IllegalArgumentException when deserializing JSON response to create tweet. The error seems to be related to a newish JSON field that was added to the response to create tweets via the TwitterApi.tweets().createTweet() api call. The exact error is:
java.lang.IllegalArgumentException: The field edit_history_tweet_ids in the JSON string is not defined in the TweetCreateResponseData properties. JSON: {"edit_history_tweet_ids":["1671964017076883456"],"id":"1671964017076883456","text":""Ahoy!""}
Steps to reproduce the behavior
Use the twitter api to create a tweet and attempt to deserialize the response directly to a TweetCreateResponse object.
TweetCreateResponse result = apiInstance.tweets().createTweet(createTweetRequest);
The text was updated successfully, but these errors were encountered:
Getting an IllegalArgumentException when deserializing JSON response to create tweet. It looks like the TweetCreateResponseData class doesn't contain fields present in the create tweet response JSON since Sept 20, 2022:
https://developer.twitter.com/en/docs/twitter-api/fields
By default, the Tweet object only returns the id and the text fields, and for Tweets created since September 29, 2022, the edit_history_tweet_ids field.
Expected behavior
CreateTweetRequest instance is created and populated with tweet information from the JSON response to create a tweet.
Actual behavior
Getting an IllegalArgumentException when deserializing JSON response to create tweet. The error seems to be related to a newish JSON field that was added to the response to create tweets via the TwitterApi.tweets().createTweet() api call. The exact error is:
java.lang.IllegalArgumentException: The field
edit_history_tweet_ids
in the JSON string is not defined in theTweetCreateResponseData
properties. JSON: {"edit_history_tweet_ids":["1671964017076883456"],"id":"1671964017076883456","text":""Ahoy!""}Steps to reproduce the behavior
Use the twitter api to create a tweet and attempt to deserialize the response directly to a TweetCreateResponse object.
TweetCreateResponse result = apiInstance.tweets().createTweet(createTweetRequest);
The text was updated successfully, but these errors were encountered: