URL for a link to Twitter for a specific tweet

前端 未结 6 584
星月不相逢
星月不相逢 2021-01-31 01:04

I have some Javascript that uses Twitter API to get tweets. I parse the data and use jQuery to generate HTML for the DOM.

An aspect of what I want to display is a \"Vie

相关标签:
6条回答
  • 2021-01-31 01:22

    Unfortunately, all of the answers provided so far rely on an HTTP redirect.

    The direct link is of the form: https://twitter.com/i/web/status/{tweet-status-id}

    0 讨论(0)
  • 2021-01-31 01:22

    FYI: id_str is the variable you need to call instead of id

    id_str should be taken from the tweet object and replaced in https://twitter.com/statuses/[id_str]

    0 讨论(0)
  • 2021-01-31 01:29

    I've been tried it. It's work good: - Web : https://twitter.com/statuses/ID - Mobile && Web: https://twitter.com/User_ID/statuses/Tweet_ID

    I hope it's helpful for you.

    0 讨论(0)
  • 2021-01-31 01:41

    https://twitter.com/statuses/ID should work.
    it will redirect to the needed status.

    0 讨论(0)
  • 2021-01-31 01:47

    You can use like:

    http://twitter.com/itdoesnotmatter/status/[YOURID]

    Twitter redirect based on status ID not username.

    It works for desktop and mobile.

    0 讨论(0)
  • 2021-01-31 01:47

    You can use

    'https://www.twitter.com/'+ user.screen_name+'/status/' + id_str

    0 讨论(0)
提交回复
热议问题