doudao5287 2011-12-14 15:46
浏览 58
已采纳

什么PHP Twitter OAuth库可用? 我应该使用哪一个?

Twitter lists the PHP Libraries below on their developer site. I'm working my way through their code, but I wanted to get some feedback from the community of experts.

  1. Are there others which are newer / better?
  2. Which one is the most widely used?
  3. What are the advantages and disadvantages for each?
  • Oauth-php by Corollarium Technologies – an OAuth library for clients and providers
  • Services_Twitter (PEAR) by Joe Stump, David Jean Louis and Bill Shupp – a Twitter API library
  • TmhOAuth by Matt Harris – an OAuth library (supports file uploading)
  • TwitterOAuth by Abraham Williams – a Twitter API library
  • Twitter async by Jaisen Mathai – a wrapper for Twitter OAuth API (provides asynchronous calls)

Notes: I know the "Which one should I use?" part of the question title is subjective, but I think the question body asks in a more objective way and the title seemed better shorter.

I will upvote all helpful / useful answers :)

  • 写回答

2条回答 默认 最新

  • dsc80135 2011-12-14 21:35
    关注

    I've used Abraham's TwitterOAuth library and find it to be quite good. It comes with some good working example pages that go through the OAuth dance, and provides you with a simple TwitterOAuth object that has methods like get and post.

    // $connection is the instantiated TwitterOAuth object
    $connection->post('statuses/update', array('status' => 'Hello, World!', 'in_reply_to_status_id' => 123456));
    $tweets = $connection->get('statuses/home_timeline', array('include_entities' => true));
    

    I can't comment on the other libraries, as I haven't used them - but then I haven't needed to either ;)

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥120 计算机网络的新校区组网设计
  • ¥20 完全没有学习过GAN,看了CSDN的一篇文章,里面有代码但是完全不知道如何操作
  • ¥15 使用ue5插件narrative时如何切换关卡也保存叙事任务记录
  • ¥20 海浪数据 南海地区海况数据,波浪数据
  • ¥20 软件测试决策法疑问求解答
  • ¥15 win11 23H2删除推荐的项目,支持注册表等
  • ¥15 matlab 用yalmip搭建模型,cplex求解,线性化处理的方法
  • ¥15 qt6.6.3 基于百度云的语音识别 不会改
  • ¥15 关于#目标检测#的问题:大概就是类似后台自动检测某下架商品的库存,在他监测到该商品上架并且可以购买的瞬间点击立即购买下单
  • ¥15 神经网络怎么把隐含层变量融合到损失函数中?