Skip to content

Instantly share code, notes, and snippets.

@niwatako
Created August 6, 2016 05:19
Show Gist options
  • Save niwatako/a1dee2d4d4d5f0f516514171d4ef87e9 to your computer and use it in GitHub Desktop.
Save niwatako/a1dee2d4d4d5f0f516514171d4ef87e9 to your computer and use it in GitHub Desktop.
SLRequestを使えば、Twitterの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