Skip to content

Instantly share code, notes, and snippets.

@niwatako
Created August 6, 2016 05:20
Show Gist options
  • Save niwatako/b798b4f9130496cee3fd6580b418e6e7 to your computer and use it in GitHub Desktop.
Save niwatako/b798b4f9130496cee3fd6580b418e6e7 to your computer and use it in GitHub Desktop.
SLRequestは、APIのURLを渡してOSから取得したTwitterアカウントを指定すれば、リクエストを生成してくれる #CodePiece #realm_swift #realm_jp
let requestURL = NSURL(string: "https://api.twitter.com/1/statuses/home_timeline.json")
let request = SLRequest(forServiceType: SLServiceTypeTwitter, requestMethod: .GET, URL: requestURL, parameters: nil)
request.account = account
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment