Twitter SwifterTwitter 框架

联合创作 · 2023-09-19 06:32

Swifter 是一个用 Swift 开发的 iOS & OS X 的 Twitter 框架。

示例代码:

//Instantiation with ACAccount:
let swifter = Swifter(account: twitterAccount)

//Instansiation with OAuth:
let swifter = Swifter(consumerKey: "", consumerSecret: "")

swifter.authorizeWithCallbackURL(callbackURL, success: {
    accessToken, response in

    // ...

    }, 
    failure: {

    // ...

    })

swifter.getStatusesHomeTimelineWithCount(20, sinceID: nil, maxID: nil, trimUser: true, contributorDetails: false, includeEntities: true, success: {
    statuses, response in

    // ...

    }, failure: {

    // ...

    })
浏览 1
点赞
评论
收藏
分享

手机扫一扫分享

编辑
举报
评论
图片
表情
推荐
点赞
评论
收藏
分享

手机扫一扫分享

编辑
举报