twitter-context-annotations
twitter-context-annotations copied to clipboard
Search tweets or person by entity_id.
Is there a way to find tweets or users by entity_id using the twitter API v2?
Use the context
operator when performing a search query.
Example (from the page above)
context:65.852262932607926273
will get all tweets from domain 65 (interest & hobbies) and entity 65.852262932607926273 (cats)
Thank you. That sounds great and is working. Impartant hin in your example is: if taking the context from your csv file, I have to replac "," by "."
But how is the context syntax like this example from your file:
"131,166",1306568690641428481,$AMD
context:"131.166".1306568690641428481,$AMD
is not working.
The entity from your example ($AMD) is related to two different domains (131 and 166), that's why the csv file shows "131,166"
for that particular line.
If you want to get results from both domains, use (context:131.1306568690641428481 OR context:166.1306568690641428481)
.
I believe you can also use the entity
operator with the string entity and just write entity:$AMD
instead, but I've never tested this method and I'm not sure how it will behave with the $
sign.
Hope that helps!
I've just tested it and you can pass entity:"$AMD"
to make it work (note the double quotes wrapping the $AMD
entity).
I'm guessing the issue can be closed now, if you agree.