开发者

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/friends to get list of your friends
  • Call statuses/followers to 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
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜