Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

browser freezes while retrieving friends or followers #18

Open
rikjanssen opened this issue Feb 15, 2013 · 3 comments
Open

browser freezes while retrieving friends or followers #18

rikjanssen opened this issue Feb 15, 2013 · 3 comments
Assignees
Labels

Comments

@rikjanssen
Copy link

When I run the 'friends.php' example script the browser freezes like when playing with infinite loops. The authentication seems to work since I am able to post tweets and print the array of all my userdata.

Any help/a solution would be great! Thanx!

https://github.com/themattharris/tmhOAuth-examples/blob/master/friends.php

@ghost ghost assigned themattharris Feb 19, 2013
@themattharris
Copy link
Owner

hey there, friends.php is designed as an example of crawling the friends list of a user. as such if blocks until the complete list is downloaded.

for a web version you instead want to either:

  • pre-execute something like friends.php, store the results to cache and then query it from the webpage
  • limit the request to one poll of the twitterapi and then only poll for more friends when the user scrolls far enough down the page.

@rikjanssen
Copy link
Author

Hey,

Thank you for your answer! This is really helpful.

This is what i am trying to accomplish: to cron a php file (once a day), collecting all the followers & friends and store them in a database for further processing. So it would be great if this can be done in 1 swift move. I guess it's better to start from scratch.

@JoostA
Copy link

JoostA commented May 23, 2013

Hi Matt,

I have the same problem, I want to 'crawl' my twitter followers, and the people I am following, however the browser keeps loading. Sadly I'm not a very experienced programmer, so I was wondering how I can limit the request. If I execute the full request nothing happens (for at least 15 minutes). I have changed the lookup size to: change define('LOOKUP_SIZE', 3);
Even now it has been running for 15 min. with no result.

My compliments for the great work, and the kindness of sharing!

Kind regards,

Joost

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants