Your SlideShare is downloading. ×
SwiftでSNSに投稿してみよう!!
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×

Saving this for later?

Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime - even offline.

Text the download link to your phone

Standard text messaging rates apply
We'd love to hear what you think

By taking this short survey, you'll help us make SlideShare better. It shouldn't take more than a few minutes.

Start Survey

SwiftでSNSに投稿してみよう!!

69
views

Published on

「Swiftビギナーズ勉強会 …

「Swiftビギナーズ勉強会 第6回@Co-Edo」の発表したサンプルです。
※実際の投稿は、ユーザー自身がTwitterまたは、Facebookアカウントの設定をしていることが必要です。
https://swift-beginners.doorkeeper.jp/events/21881

Social.frameworkを利用して、TwitterやFacebookに投稿するアプリです。

=================

「Swiftビギナーズ勉強会」は、iOSアプリをSwift、Objective-Cなどで開発するための初心者勉強会&もくもく会です。

開催の連絡は以下の方法で受け取ることができます。

DoorKeeperグループ

イベント申し込みを受け付けている、DoorKeeper でのグループです。
https://swift-beginners.doorkeeper.jp/

Facebookグループ:

イベント告知や技術情報をお互いにシェアしています。
https://www.facebook.com/groups/swiftbg/

Twitterハッシュタグ

ハッシュタグは、 #swiftbg です。
Twitterにもイベント、勉強会の情報を流しています。

Published in: Engineering

0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
69
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
0
Comments
0
Likes
0
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. SwiftでSNSに投稿してみよう! Swiftビギナーズ倶楽部 第6回 写真素材ぱくたそ http://www.pakutaso.com
  • 2. • WordPressもくもく倶楽部@Co-Edoもやってます。 • Ruby / Ruby on Rails ビギナーズ倶楽部@Co-Edoやってます( ́ ▽ ` )ノ • スマホアプリ開発初心者な、アプリケーションエンジニア(Rails / LAMP / Java / Oracle) Self-Intoroduction http://ror-beginners.doorkeeper.jp/ http://wp-moku.doorkeeper.jp/ 徳島県出身です (ó `o)
  • 3. 2)Twitterで、つぶやいてみよう! Today's Agenda 3)Facebookに、投稿してみよう! 4)実際にやってみよう!(DEMO) 1)実装のポイント
  • 4. 1)実装のポイント ・フレームワークを利用して実装する。 ・iOS5から追加されたTwitter.frameworkは廃止の予定。 ・OS6から、Twitter、Facebook、微博(Weibo)を統合した
  Social.frameworkを利用して実装しよう!
  • 5. 2)Twitterで、つぶやいてみよう! 1­1)フレームワークのインポート ViewController.swift import UIKit import Social ← 追加する 1­2)投稿画面の表示コード @IBAction func twitterBtn(sender: AnyObject) { var twitterVC = SLComposeViewController(forServiceType: SLServiceTypeTwitter) twitterVC.setInitialText("Twitterに、つぶやくよ") presentViewController(twitterVC, animated: true, completion: nil) } ViewController.swift たったこれだけ!
  • 6. 3)Facebookに、投稿してみよう! 2­1)フレームワークのインポート ViewController.swift import UIKit import Social ← 追加する 2­2)投稿画面の表示コード @IBAction func facebookBtn(sender: AnyObject) { var facebookVC = SLComposeViewController(forServiceType: SLServiceTypeFacebook) facebookVC.setInitialText("Facebookに、投稿するよ") presentViewController(facebookVC, animated: true, completion: nil) } ViewController.swift AOuth認証も iOSがいい感じに してくれます♪
  • 7. 4)実際にやってみよう! Let s DEMO! https://github.com/mustacheyork/postSnsApp
  • 8. Let's study together! Thank you :)