3
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

[iOS] [Objective-C] Facebook API経由でmessageを送信する

3
Last updated at Posted at 2014-12-17

結論

調べた限りはできないっぽい。

chat api は 2015年4月でdepricated

chat api というものを使うとできたのかもしれないが、これは2015年4月にdeprecateされる。
https://developers.facebook.com/docs/chat?locale=ja_JP
代わりの案をFacebookが提供してくれるかは未定らしい(2014/12/17現在)

URL Scheme

URL Scheme経由でデフォルトの友人とメッセージを設定して、messangerアプリを起動できたらいいなと思った。しかし、デフォルトの友人は設定できるが、メッセージの設定ができないようだ。
http://stackoverflow.com/questions/25467445/custom-uri-schemes-for-the-facebook-messenger

代替案

[FBDialogs presentMessageDialogWithLink:name:caption:description:picture:clientState:handler];

を使うしかないという結論になった。
これは送る友人を設定はできないが、送りたいURLは設定できる。
https://developers.facebook.com/docs/reference/ios/current/class/FBDialogs/

 

注:上記はあくまで僕が2014/12/17に調べた限りの結論です。

3
3
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?