Created
April 8, 2014 19:02
-
-
Save nhindman/10172082 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1. User clicks at the photo. There is onclick(@twitter_username) handler for every photo. | |
2. there is ajax ($jquery) request to the server, for example: GET /tweets/twitter_user_name | |
3. Server (php) got request from client side, for example /tweets/nhindman | |
4. Server (php) sends request to the twitter API (as i made in nodejs example). | |
5. Server (php) got response from twitter API and filter it (as i made in nodejs example) | |
6. Server sends filtered result to the client, something like: | |
{tweets: [ | |
"..." : "..... http://..... ...." | |
]} | |
7. client got server response and extracts URLs from tweets and scrapes URLs for title, image, first paragraph of text. | |
8. client renders scraped content of each URL on page in pop-up div |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment