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 微信会员卡等级和折扣规则
  • ¥15 微信公众平台自制会员卡可以通过收款码收款码收款进行自动积分吗
  • ¥15 随身WiFi网络灯亮但是没有网络,如何解决?
  • ¥15 gdf格式的脑电数据如何处理matlab
  • ¥20 重新写的代码替换了之后运行hbuliderx就这样了
  • ¥100 监控抖音用户作品更新可以微信公众号提醒
  • ¥15 UE5 如何可以不渲染HDRIBackdrop背景
  • ¥70 2048小游戏毕设项目
  • ¥20 mysql架构,按照姓名分表
  • ¥15 MATLAB实现区间[a,b]上的Gauss-Legendre积分