Integration of the Twitter and Google Map APIs. Based on the search query for tweets, the app, places marker on the map for the location of the users tweeting the tweets matching the search query.
The API project makes use of two APIs, Twitter API, and Google Map Javascript, and Geocoding API.
- The user searches for tweets based on keyword. The Twitter API return tweets which has the search query in the tweets. The location field value from the user object of these tweets is fetched.
- The location value is then passed to Google Map GeoCoding API which tries to retrieve the latlong values for each of the valid locations.
- The latlong values are then plotted on the map with a marker, using Google Map Javascript API.
- Tweets matching the search query are also listed along with the username and time of posting are also listed below the map.
The source code in the repo will not run when cloned due to the following reasons. The Google Map API key found in the index.html is HTTP referrer restricted. The Twitter Bearer Token (in the index.php file) has been hidden. To run the code, kindly fetch your own Google Map API key and Twitter Bearer Token.