DaylightingSociety / SocMap

Social Mapping Framework for Twitter
https://socmap.daylightingsociety.org/
BSD 3-Clause "New" or "Revised" License
18 stars 4 forks source link

Implement getMentionsFromText() #2

Closed milo-trujillo closed 6 years ago

milo-trujillo commented 6 years ago

Two options here:

  1. Parse the tweet manually, use a regular expression to extract usernames from the tweet

  2. See if the tweet JSON has an array of mentioned users, and extract that field instead

Let's aim for the second option. If we're lucky it's in the form of twitter IDs instead of usernames, and we can just use those everywhere.

milo-trujillo commented 6 years ago

Task complete and pushed to master. Unfortunately the tweets do not contain mentions in the JSON, so I used a regex on the body text.