stMind

about Tech, Computer vision and Machine learning

instagram APIを読む iPhone Hook編

Instagram API iPhone Hook

iPhoneアプリからの連携も出来るinstagram API

OVERVIEW

CUSTOM URI SCHEME

  • instagram://に続けてパラメータを指定することで、アプリを開き特定のアクションを実行可能

im.kayac.com経由でカスタムURIを使ってみる。

$ curl -d 'message=open instagram' -d 'handler=instagram://app' http://im.kayac.com/api/post/{username}

とやってみると確かにinstagramを起動出来た!(当たり前)

$ curl -d 'message=open instagram' -d 'handler=instagram://tag?name=arsenal' http://im.kayac.com/api/post/{username}

とかやるとタグフィードが見れたり。(ズラタン…)


DOCUMENT INTERACTION

自作アプリからinstagramに写真を渡すことが出来る

  • iOS Document Interaction APIs
  • PNGJPEGで保存、拡張子は".ig"
  • Document Interaction UTIはcom.instagram.photo
  • 高さ及び/または幅は少なくとも612px
    • 推奨はJPEGで612x612の正方形