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条)

报告相同问题?

悬赏问题

  • ¥15 乌班图ip地址配置及远程SSH
  • ¥15 怎么让点阵屏显示静态爱心,用keiluVision5写出让点阵屏显示静态爱心的代码,越快越好
  • ¥15 PSPICE制作一个加法器
  • ¥15 javaweb项目无法正常跳转
  • ¥15 VMBox虚拟机无法访问
  • ¥15 skd显示找不到头文件
  • ¥15 机器视觉中图片中长度与真实长度的关系
  • ¥15 fastreport table 怎么只让每页的最下面和最顶部有横线
  • ¥15 java 的protected权限 ,问题在注释里
  • ¥15 这个是哪里有问题啊?