Skip to content

getTextEntities

Sahri Riza Umami edited this page Jun 7, 2018 · 3 revisions

Returns all entities (mentions, hashtags, cashtags, bot commands, URLs, and email addresses) contained in the text.
This is an offline method.
Can be called before authorization.
Can be called synchronously.

getTextEntities(text)
Field Type Description
text string The text in which to look for entites

Example

  • Get entities contained in the text "www.rizaumami.com".

    getTextEntities('www.rizaumami.com')

    Response:

    {
      ["@type"] = "textEntities",
      entities = {
        [0] = {
          ["@type"] = "textEntity",
          length = 17,
          offset = 0,
          type = {
            ["@type"] = "textEntityTypeUrl"
          }
        }
      }
    }  

Frequently Asked Questions
The Functions

Clone this wiki locally