支持 oAuth 和 streaming api 的 objective c Twitter library - V2EX
V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
iOS 开发实用技术导航
NSHipster 中文版
http://nshipster.cn/
cocos2d 开源 2D 游戏引擎
http://www.cocos2d-iphone.org/
CocoaPods
http://cocoapods.org/
Google Analytics for Mobile 统计解决方案
http://code.google.com/mobile/analytics/
WWDC
https://developer.apple.com/wwdc/
Design Guides and Resources
https://developer.apple.com/design/
Transcripts of WWDC sessions
http://asciiwwdc.com
Cocoa with Love
http://cocoawithlove.com/
Cocoa Dev Central
http://cocoadevcentral.com/
NSHipster
http://nshipster.com/
Style Guides
Google Objective-C Style Guide
NYTimes Objective-C Style Guide
Useful Tools and Services
Charles Web Debugging Proxy
Smore
timshi
V2EX    iDev

支持 oAuth 和 streaming api 的 objective c Twitter library

  •  
  •   timshi 2011-02-05 05:42:03 +08:00 5960 次点击
    这是一个创建于 5385 天前的主题,其中的信息可能已经有所发展或是发生改变。
    6 条回复    1970-01-01 08:00:00 +08:00
    timshi
        1
    timshi  
    OP
       2011-02-05 05:56:04 +08:00
    因为发现 twitter 推荐的 MG Twitter Engine 不支持 oAuth 和 streaming api,并且set up过程很复杂(它试图支持各种xml 和 json 的 parser)。所以动手在它的基础上加了这两个功能,并且简化了 setup 的步骤, 然后写了一个小的 demo project。请问有人计划做iOS上的 twitter integration么,你觉得这样的project有开源的价值么?
    Livid
        2
    Livid  
    MOD
    PRO
       2011-02-05 06:56:30 +08:00
    我觉得直接用 ASIHTTPRequest 做会让事情简单很多,尤其是在 ASIHTTPRequest 支持 blocks 之后。
    timshi
        3
    timshi  
    OP
       2011-02-05 07:18:41 +08:00
    ASIHttpRequest 是 CFNetwork 的 wrapper 吧? 如果用它可能可以简化这个library的实现。不过我所提到的library是更高一层的abstraction, 用户直接调用象 updateStatus, follow, unfollow 这样的method。 不需要直接接触 http connection 一层的东西, 那些都由library 处理。另外oAuth方面也是一样,用户只需要调用 requestRequestToken, requestAccessToken,和他们的delegate,而不需要去接触http级的东西。
    Livid
        4
    Livid  
    MOD
    PRO
       2011-02-05 07:20:56 +08:00
    @timsi 可以做一个 Singleton 实现的 simple Twitter data client,任何时候需要用到 Twitter 的时候,就这样子:

    TwitterUser * user = [[TwitterManager sharedManager] currentUser];

    [[TwitterManager sharedManager] updateStatusWithString:@"Hello world"];
    timshi
        5
    timshi  
    OP
       2011-02-05 10:15:40 +08:00
    @livid 我正是这么想的。
    timshi
        6
    timshi  
    OP
       2011-02-05 11:46:26 +08:00
    git hub

    https://github.com/TimShi/TSTwitterEngine

    check out project 以后:

    1. 在 TwitterEngine.h 里填上你的 consumer key, consumer secret
    2. 在 TwitterCommonLibraryAppDelegate.m 里把 tracking keyword 改成你想要的tracking keyword. 现在是设置成 "github"

    That's it, build and run the project。

    你会先被提示去登录 twitter, 然后 twitter 上所有带你所设定的 keyword 的 tweets 都会实时出现在 tableview 上。
    关于     帮助文档     自助推广系统     博客     API     FAQ     Solana     1009 人在线   最高记录 6679       Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 27ms UTC 18:40 PVG 02:40 LAX 10:40 JFK 13:40
    Do have faith in what you're doing.
    ubao msn snddm index pchome yahoo rakuten mypaper meadowduck bidyahoo youbao zxmzxm asda bnvcg cvbfg dfscv mmhjk xxddc yybgb zznbn ccubao uaitu acv GXCV ET GDG YH FG BCVB FJFH CBRE CBC GDG ET54 WRWR RWER WREW WRWER RWER SDG EW SF DSFSF fbbs ubao fhd dfg ewr dg df ewwr ewwr et ruyut utut dfg fgd gdfgt etg dfgt dfgd ert4 gd fgg wr 235 wer3 we vsdf sdf gdf ert xcv sdf rwer hfd dfg cvb rwf afb dfh jgh bmn lgh rty gfds cxv xcv xcs vdas fdf fgd cv sdf tert sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf shasha9178 shasha9178 shasha9178 shasha9178 shasha9178 liflif2 liflif2 liflif2 liflif2 liflif2 liblib3 liblib3 liblib3 liblib3 liblib3 zhazha444 zhazha444 zhazha444 zhazha444 zhazha444 dende5 dende denden denden2 denden21 fenfen9 fenf619 fen619 fenfe9 fe619 sdf sdf sdf sdf sdf zhazh90 zhazh0 zhaa50 zha90 zh590 zho zhoz zhozh zhozho zhozho2 lislis lls95 lili95 lils5 liss9 sdf0ty987 sdft876 sdft9876 sdf09876 sd0t9876 sdf0ty98 sdf0976 sdf0ty986 sdf0ty96 sdf0t76 sdf0876 df0ty98 sf0t876 sd0ty76 sdy76 sdf76 sdf0t76 sdf0ty9 sdf0ty98 sdf0ty987 sdf0ty98 sdf6676 sdf876 sd876 sd876 sdf6 sdf6 sdf9876 sdf0t sdf06 sdf0ty9776 sdf0ty9776 sdf0ty76 sdf8876 sdf0t sd6 sdf06 s688876 sd688 sdf86