sprinklr-inc/twitter4j-ads

TwitterAdObjective class doesn't have organic tweet option

Opened this issue · 1 comments

I'm calling the TwitterAdsStatApi.fetchStatsSync method for an organic tweet. The only valid MetricGroups are Engagement and Video. TwitterAdObjective does not supply an option for that.

14:29:42.543 [main] DEBUG twitter4j.HttpResponseImpl - {"errors":[{"code":"INVALID_PARAMETER","message":"Valid metric groups for entity OrganicTweet are Engagement,Video"}],"request":{"params":{"start_time":"2017-04-20T05:00:00Z","entity_ids":["XXXXXXXXXXXXXXXX"],"end_time":"2017-04-27T05:00:00Z","placement":"ALL_ON_TWITTER","account_id":""XXXXXXXX"granularity":"TOTAL","entity":"ORGANIC_TWEET","metric_groups":["BILLING","VIDEO","ENGAGEMENT"]}}}

It might actually simply be something that was never implemented in the original code base...If that's the case, The fastest way to fix might be to just implement it or see if someone in the community has already done that. I just took a look at TwitterOrganicTweetStatistics and it looks like the support is at least partway there.