How would you mange twitter accounts?
Posted: Sat Mar 24, 2012 12:53 pm
Hello guys
I know this is a very general question and maybe a bit out of topic... but i dont know where can i ask this:
Twitter users can login and post comments on my site, as well as new posts.
Now, i am storing the user ID on my comments table on the database. I was wondering what is the best practice to get users avatar and show it anywhere.
I guess i will have to store also the username as it is used to get the twitter profile picture if i use this code:
<?php
$username = "twitter"; // <-- You did not use quotes here?! Typo?
$xml = simplexml_load_file("http://twitter.com/users/".$username.".xml");
echo $xml->profile_image_url; // <-- No $xml->user here!
?>
But if i have to show, let's say, 20/30 avatars on one same page, do you think there will be a big delay getting all of them?
How would you do it?
There are many pages and systems with have to deal with same problems such as pinterest.com, or liveFyre comment system, disqus... and i was wondering how they do it. What's the best practice for it.
I know this is a very general question and maybe a bit out of topic... but i dont know where can i ask this:
Twitter users can login and post comments on my site, as well as new posts.
Now, i am storing the user ID on my comments table on the database. I was wondering what is the best practice to get users avatar and show it anywhere.
I guess i will have to store also the username as it is used to get the twitter profile picture if i use this code:
<?php
$username = "twitter"; // <-- You did not use quotes here?! Typo?
$xml = simplexml_load_file("http://twitter.com/users/".$username.".xml");
echo $xml->profile_image_url; // <-- No $xml->user here!
?>
But if i have to show, let's say, 20/30 avatars on one same page, do you think there will be a big delay getting all of them?
How would you do it?
There are many pages and systems with have to deal with same problems such as pinterest.com, or liveFyre comment system, disqus... and i was wondering how they do it. What's the best practice for it.