All ServiceObject
requests take a request name (string) and list of parameters. In this case if you want to extract GeoLocation
for a set of tweets it seems you'll have to do it like this:
tweets =
twitter["TweetSearch",
"Query" -> "#WolframAlpha"
];
twitter["GetTweet",
"TweetID" -> #,
"Elements" -> "FullData"
]["Location"] & /@ Normal@tweets[All, "ID"]
{Missing["NotAvailable"], Missing["NotAvailable"],
Missing["NotAvailable"], Missing["NotAvailable"],
Missing["NotAvailable"], Missing["NotAvailable"],
Missing["NotAvailable"], Missing["NotAvailable"],
Missing["NotAvailable"], Missing["NotAvailable"],
Missing["NotAvailable"]}
It seems to me that this parameter is of minimal use in general though. I've never seen anything except Missing
. Also I would have imagined they'd have implemented this in batched form via this request but I guess not.
If you instead want to add a location parameter to your tweet search you can do it like so:
loc = FindGeoLocation["255 Elm St, Somerville, MA 02144"];
twitter["TweetSearch",
"Query" -> "",
GeoLocation ->loc
]