We got access of Ads API and we created our own dashboard for reports and creating campaign. But we are not able to display promoted tweet content. When we get list of promoted tweet for a specific line_item only tweet_id and line_item pair is returned. Now how can i get a list of promoted tweets with content and preivew. Should i request for each tweet or is there any other way ?
Hey @lucky8139 - you should use the
GET accounts/:account_id/tweet/preview/:tweet_id endpoint - this allows you to preview an existing Tweet as it would appear across a variety of different platforms as well as how it will look on Twitter or the Twitter Audience Platform.
The response you get back is JSON that contains a fully functional HTML document that is ready to render a preview in a browser! All you need is the
I was wondering if there were an option to do that in bulk to limit the number of API calls.
If you know the
tweet_ids, what you could do is make a request to
https://api.twitter.com/1.1/statuses/lookup.json?id=[COMMA_SEPARATED_LIST_OF_IDS]. This will return a list of all requested tweets with their content and the user who posted the tweet. You can also trim the user info out by adding
trim_user=true to the request.
More info on the endpoint here: https://dev.twitter.com/rest/reference/get/statuses/lookup