I would like to be able to get recent tweets of an individual from their page. Is there anyway I can do this? I'm sorry if this isn't enough informations, but I don't even know where to get started and I couldn't find anything else online to help.
5 Answers
For fetching the tweets client side, you would have to use cross-domain AJAX. See: jsonp with jquery (first answer actually has twitter-specific loading code).
Alternatively, you could fetch the tweets server-side, by (for example) using file_get_contents
to download their tweet stream, and then parsing it however you choose.
-
Okay, thanks for pointing me in the right direction. I'll probably have to edit this question for help once I get stuck... – Tanner Ellis Apr 22 '12 at 02:20
-
Oh gosh, I'm so lost. I have a lot of studying to do. – Tanner Ellis Apr 22 '12 at 02:22
-
@TannerEllis Are you looking to do the loading client or server side? I noticed you included both the `php` and `javascript` tags. – jli Apr 22 '12 at 02:24
-
Truthfully, I have no idea. I just figured those would be two languages that it might require, so I put both of them. – Tanner Ellis Apr 22 '12 at 02:40
usually, to get information from a website with a program, you will have to "scrape" the website (search how to do that on Google). Sometimes it's illegal though, so you might want to check the privacy terms and stuff. Thats just general, not specifically tweets.

- 529
- 2
- 6
- 14
Tanner Ellis, you are in software industry, you always have something to study. Even experienced people have to study more to know new things.. Anyway, you can use curl which is faster than file_get_contents. and cross domain ajax is not allowed in most of browsers/sites. you can use api if provided by that site.

- 307
- 2
- 16
-
-
I am most certainly not experienced. Haha, I'm really bad. I just started learning last year (8th grade). – Tanner Ellis Apr 22 '12 at 02:39