What's the best way to use the Twitter API via PHP?

前端 未结 6 1911
梦如初夏
梦如初夏 2021-01-12 16:58

A client would like me to add their Twitter stream to their website homepage, using a custom solution built in PHP.

The Twitter API obviously has a limited number of

6条回答
  •  伪装坚强ぢ
    2021-01-12 17:37

    You may want to use TweetPHP by Tim Davies. http://lab.lostpixel.net/classes/twitter/ - This class has lots of features including the one you want, showing your clients time line. The page shows good examples on how to use it.

    You can then put the output of this in a file or database. If you want the site visitor to update the database or the file like every 5 minutes so, you can set a session variable holding a timestamp and just allow another update if the timestamp was at least 5 minutes ago.

    Hope this helps

提交回复
热议问题