Created
May 21, 2013 17:08
-
-
Save patrickmj/5621451 to your computer and use it in GitHub Desktop.
Sample twitter JSON data to start learning how to import for Boston Marathon project
This file contains hidden or 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
<?php | |
$json = '[{"created_at":"Mon Apr 15 18:02:53 +0000 2013","id":323858984949923840,"id_str":"323858984949923840","text":"Random girl next to me in class shows me tweets about me, uuhhhhh okay #thanks?","source":"\u003ca href=\"http:\/\/twitter.com\/download\/android\" rel=\"nofollow\"\u003eTwitter for Android\u003c\/a\u003e","truncated":false,"in_reply_to_status_id":null,"in_reply_to_status_id_str":null,"in_reply_to_user_id":null,"in_reply_to_user_id_str":null,"in_reply_to_screen_name":null,"user":{"id":499196071,"id_str":"499196071","name":"KSB","screen_name":"KSVelociraver","location":"","url":null,"description":"Life is short, live each day like your last... no worries","protected":false,"followers_count":41,"friends_count":77,"listed_count":0,"created_at":"Tue Feb 21 21:42:10 +0000 2012","favourites_count":298,"utc_offset":-14400,"time_zone":"Atlantic Time (Canada)","geo_enabled":true,"verified":false,"statuses_count":1360,"lang":"en","contributors_enabled":false,"is_translator":false,"profile_background_color":"C0DEED","profile_background_image_url":"http:\/\/a0.twimg.com\/profile_background_images\/676452263\/92320c298c57833191f3e4450b05a65b.jpeg","profile_background_image_url_https":"https:\/\/si0.twimg.com\/profile_background_images\/676452263\/92320c298c57833191f3e4450b05a65b.jpeg","profile_background_tile":true,"profile_image_url":"http:\/\/a0.twimg.com\/profile_images\/2680263922\/2ac34ceefe958eb13f9f19f55d98b09e_normal.jpeg","profile_image_url_https":"https:\/\/si0.twimg.com\/profile_images\/2680263922\/2ac34ceefe958eb13f9f19f55d98b09e_normal.jpeg","profile_banner_url":"https:\/\/si0.twimg.com\/profile_banners\/499196071\/1362966222","profile_link_color":"0084B4","profile_sidebar_border_color":"FFFFFF","profile_sidebar_fill_color":"DDEEF6","profile_text_color":"333333","profile_use_background_image":true,"default_profile":false,"default_profile_image":false,"following":null,"follow_request_sent":null,"notifications":null},"geo":{"type":"Point","coordinates":[43.1360135,-70.9311666]},"coordinates":{"type":"Point","coordinates":[-70.9311666,43.1360135]},"place":{"id":"23e3200782822455","url":"http:\/\/api.twitter.com\/1\/geo\/id\/23e3200782822455.json","place_type":"city","name":"Durham","full_name":"Durham, NH","country_code":"US","country":"United States","bounding_box":{"type":"Polygon","coordinates":[[[-70.947765,43.125577],[-70.947765,43.155425],[-70.898309,43.155425],[-70.898309,43.125577]]]},"attributes":{}},"contributors":null,"retweet_count":0,"favorite_count":0,"entities":{"hashtags":[{"text":"thanks","indices":[71,78]}],"urls":[],"user_mentions":[]},"favorited":false,"retweeted":false,"filter_level":"medium","lang":"en"} | |
,{"created_at":"Mon Apr 15 18:02:54 +0000 2013","id":323858989404274688,"id_str":"323858989404274688","text":"@KeeneBean23 A flaming hater","source":"\u003ca href=\"http:\/\/twitter.com\/download\/iphone\" rel=\"nofollow\"\u003eTwitter for iPhone\u003c\/a\u003e","truncated":false,"in_reply_to_status_id":323858692363665408,"in_reply_to_status_id_str":"323858692363665408","in_reply_to_user_id":600653394,"in_reply_to_user_id_str":"600653394","in_reply_to_screen_name":"KeeneBean23","user":{"id":719441197,"id_str":"719441197","name":"\u270cJhavon Robinson\u270c","screen_name":"J_nose_Best","location":"Shoemanacago","url":"http:\/\/Rapgenius.com","description":"#TeamFuni \u270c #HU17","protected":false,"followers_count":351,"friends_count":195,"listed_count":0,"created_at":"Fri Jul 27 04:43:50 +0000 2012","favourites_count":3187,"utc_offset":-18000,"time_zone":"Eastern Time (US & Canada)","geo_enabled":true,"verified":false,"statuses_count":9005,"lang":"en","contributors_enabled":false,"is_translator":false,"profile_background_color":"0F3D99","profile_background_image_url":"http:\/\/a0.twimg.com\/profile_background_images\/637802705\/x91ig0q2ff4en1xr98zu.jpeg","profile_background_image_url_https":"https:\/\/si0.twimg.com\/profile_background_images\/637802705\/x91ig0q2ff4en1xr98zu.jpeg","profile_background_tile":false,"profile_image_url":"http:\/\/a0.twimg.com\/profile_images\/3521130311\/86da8eeea05e3f427c00dc0b1efba993_normal.jpeg","profile_image_url_https":"https:\/\/si0.twimg.com\/profile_images\/3521130311\/86da8eeea05e3f427c00dc0b1efba993_normal.jpeg","profile_banner_url":"https:\/\/si0.twimg.com\/profile_banners\/719441197\/1364623284","profile_link_color":"1CD666","profile_sidebar_border_color":"000000","profile_sidebar_fill_color":"DDEEF6","profile_text_color":"333333","profile_use_background_image":true,"default_profile":false,"default_profile_image":false,"following":null,"follow_request_sent":null,"notifications":null},"geo":{"type":"Point","coordinates":[42.64442076,-71.35099978]},"coordinates":{"type":"Point","coordinates":[-71.35099978,42.64442076]},"place":{"id":"d6539f049c4d05e8","url":"http:\/\/api.twitter.com\/1\/geo\/id\/d6539f049c4d05e8.json","place_type":"city","name":"Lowell","full_name":"Lowell, MA","country_code":"US","country":"United States","bounding_box":{"type":"Polygon","coordinates":[[[-71.382491,42.607189],[-71.382491,42.66676],[-71.271231,42.66676],[-71.271231,42.607189]]]},"attributes":{}},"contributors":null,"retweet_count":0,"favorite_count":0,"entities":{"hashtags":[],"urls":[],"user_mentions":[{"screen_name":"KeeneBean23","name":"Keeno #3","id":600653394,"id_str":"600653394","indices":[0,12]}]},"favorited":false,"retweeted":false,"filter_level":"medium","lang":"en"} | |
, {"created_at":"Mon Apr 15 18:03:14 +0000 2013","id":323859073080623104,"id_str":"323859073080623104","text":"I\'m at Seaport Boston Hotel (Boston, MA) http:\/\/t.co\/i17VDl1omE","source":"\u003ca href=\"http:\/\/foursquare.com\" rel=\"nofollow\"\u003efoursquare\u003c\/a\u003e","truncated":false,"in_reply_to_status_id":null,"in_reply_to_status_id_str":null,"in_reply_to_user_id":null,"in_reply_to_user_id_str":null,"in_reply_to_screen_name":null,"user":{"id":207281470,"id_str":"207281470","name":"NatBreen","screen_name":"Naturdayy","location":"Boston ","url":null,"description":"\u221e Too blessed to be stressed \u2020\nDon\'t believe me- just watch #BreenTeam","protected":false,"followers_count":2754,"friends_count":690,"listed_count":5,"created_at":"Sun Oct 24 23:42:51 +0000 2010","favourites_count":457,"utc_offset":-18000,"time_zone":"Eastern Time (US & Canada)","geo_enabled":true,"verified":false,"statuses_count":9026,"lang":"en","contributors_enabled":false,"is_translator":false,"profile_background_color":"1A1B1F","profile_background_image_url":"http:\/\/a0.twimg.com\/images\/themes\/theme9\/bg.gif","profile_background_image_url_https":"https:\/\/si0.twimg.com\/images\/themes\/theme9\/bg.gif","profile_background_tile":false,"profile_image_url":"http:\/\/a0.twimg.com\/profile_images\/3458959271\/0a295a50de01325a7d5f09fc5d4f4166_normal.jpeg","profile_image_url_https":"https:\/\/si0.twimg.com\/profile_images\/3458959271\/0a295a50de01325a7d5f09fc5d4f4166_normal.jpeg","profile_banner_url":"https:\/\/si0.twimg.com\/profile_banners\/207281470\/1357942209","profile_link_color":"2FC2EF","profile_sidebar_border_color":"181A1E","profile_sidebar_fill_color":"252429","profile_text_color":"666666","profile_use_background_image":true,"default_profile":false,"default_profile_image":false,"following":null,"follow_request_sent":null,"notifications":null},"geo":{"type":"Point","coordinates":[42.34928950,-71.04132957]},"coordinates":{"type":"Point","coordinates":[-71.04132957,42.34928950]},"place":{"id":"726a69b11550c65b","url":"http:\/\/api.twitter.com\/1\/geo\/id\/726a69b11550c65b.json","place_type":"poi","name":"Seaport Hotel","full_name":"Seaport Hotel, Boston","country_code":"US","country":"United States","bounding_box":{"type":"Polygon","coordinates":[[[-71.041254,42.349649],[-71.041254,42.349649],[-71.041254,42.349649],[-71.041254,42.349649]]]},"attributes":{"street_address":"1 Seaport Ln"}},"contributors":null,"retweet_count":0,"favorite_count":0,"entities":{"hashtags":[],"urls":[{"url":"http:\/\/t.co\/i17VDl1omE","expanded_url":"http:\/\/4sq.com\/11aNbC1","display_url":"4sq.com\/11aNbC1","indices":[41,63]}],"user_mentions":[]},"favorited":false,"retweeted":false,"possibly_sensitive":false,"filter_level":"medium","lang":"en"} ]'; | |
$data = json_decode($json, true); | |
print_r($data); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment