6

For statuses/mentions, I need to authenticate as a user. I want to see the user's mentions without asking him/her to authenticate. If the tweets are public, what are the mentions not public ?

I'm writing to do this

Community
  • 1
  • 1
letronje
  • 9,002
  • 9
  • 45
  • 53

3 Answers3

7

Check the Twitter search API https://developer.twitter.com/en/docs/tweets/search/api-reference/get-search-tweets.html

To find all user mentions: just use @username as search term.

Community
  • 1
  • 1
Vadim
  • 5,154
  • 2
  • 20
  • 18
3

I would like to add that Twitter's Search API returns only tweets from past 7 days. So if you want to retrieve ALL tweets mentioning an arbitrary user, you can't.
If anyone finds a way to do this, please mention.

keerthana
  • 93
  • 10
  • Thanks, can confirm, it only got me tweets not older than 9 days. I had to do a JavaScript workaround https://gist.github.com/elhardoum/c0c0fe3c41e7947a22417209f671b78d – Ismail Jan 14 '19 at 13:19
1

There is no way to get a user's mentions using the statuses/mentions endpoint because this is possible using the search api.

http://dev.twitter.com/doc/get/search

Ricky Smith
  • 2,379
  • 1
  • 13
  • 29