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
I'm trying to get the URL of a tweet after tweeting an update with the ExTwitter.update/1 function. Looking at the twitter update status example, there is a URL to the tweet under the entities field.
But, doing ExTwitter.update("update sample") returns an ExTwitter.Model.Tweet with the entities field all empty:
Disclaimer: I'm using {:poison, "~> 4.0", override: true} in mix.exs since ExTwitter is set to 3.0.
The text was updated successfully, but these errors were encountered:
mcade
changed the title
ExTwitter.update/1 returns empty lists for entities field. How should we get the URL of a tweet after using ExTwitter.update/1?
How do we get the URL of a tweet after using ExTwitter.update/1?
Jan 23, 2020
The ExTwitter.Model.Entities.url is for links posted in a Tweet message, not for a URL to the tweet itself. Try tweeting with a URL inside the message and then the Entities model will be populated.
I think the only way to built the URL is the way you are suggesting.
I'm trying to get the URL of a tweet after tweeting an update with the
ExTwitter.update/1
function. Looking at the twitter update status example, there is a URL to the tweet under the entities field.But, doing
ExTwitter.update("update sample")
returns anExTwitter.Model.Tweet
with the entities field all empty:How am I supposed to get the URL of the tweet after using
ExTwitter.update/1
if the entities fields are empty?Right now I'm just appending the
id_str
field from the tweet to this url: https://twitter.com/i/web/status/{id_str} but not sure if this is conventional.Disclaimer: I'm using
{:poison, "~> 4.0", override: true}
in mix.exs since ExTwitter is set to 3.0.The text was updated successfully, but these errors were encountered: