php, how to insert my friends avatars from twitter to my web page?
i would like to place all my friends / followers from twitter to my webpage? no messages or timestamps, just the pictures.
开发者_开发技巧any ideas? thanks
Have you taken a look at one of the available libraries? http://dev.twitter.com/pages/libraries#php
Here are the basic steps involved after authenticating (see other questions/tutorials for that. No sense in repeating those steps here):
- Call
statuses/friendsto get list of your friends - Call
statuses/followersto get list of your followers - Loop through lists, grabbing
profile_image_url
from each user - Place URI into your web page.
Edit:
As noted by abraham, the above methods are deprecated so it is recommended to use an approach that utilizes:
- GET friends/ids
- GET followers/ids
- GET users/lookup
精彩评论