Simple gadget life programming diary

Simple gadget life の中の人によるプログラミングメモ

gtm-oauth2を使ってinstagramのアクセストークンを取得する。

このサイトが分かりやすい

How to Use OAuth 2.0 with KinveyKit iOS Tutorial | Kinvey

注意点

ダイレクトサイトを入力する際、最後にスラッシュを入れる事。
○:http://goes-nowhere-does-nothing/
×:http://goes-nowhere-does-nothing

スラッシュを入れないとgtm-oauth2がリダイレクトをキャンセルしてくれない。

Twitterでoauth2接続することは可能か?

いろいろ調べたりやってみたりしたが、結局出来なかった。
各種URL(正しいのか不明)
tokenURL : https://api.twitter.com/oauth2/token
authorizationURL : https://api.twitter.com/oauth2/authorize

また、リダイレクトサイトはTwitterの場合、実在しないサイト登録不可の模様。 正しいサイトでも試してみたが結局エラーとなりアクセストークンを取得できなかった。