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

前端 未结 6 1913
梦如初夏
梦如初夏 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:15

    array(
    'lastrequest' => 123,
    'tweets' => array ()
    )
    

    now in your code put a check to see if the timestamp in the datastore for lastrequest is more than X seconds old. If it is then its time to update your data.

    serialize and store the array in a file, pretty simple

提交回复
热议问题