-
Notifications
You must be signed in to change notification settings - Fork 30
Damien edited this page May 28, 2016
·
4 revisions
// Client-side (implicit) flow
let instagram: Provider = .Instagram(
clientID: "***",
redirectURL: "foo://callback"
)
// Server-side (explicit) flow
let instagram: Provider = .Instagram(
clientID: "***",
clientSecret: "***"
redirectURL: "foo://callback"
)
// Client-side (Implicit) flow
http://your-redirect-uri#access_token=ACCESS-TOKEN
// Server-side (Explicit) flow
{
"access_token": "fb2e77d.47a0479900504cb3ab4a1f626d174d2d",
"user": {
"id": "1574083",
"username": "snoopdogg",
"full_name": "Snoop Dogg",
"profile_picture": "..."
}
}
- basic - to read a user’s profile info and media
- public_content - to read any public profile info and media on a user’s behalf
- follower_list - to read the list of followers and followed-by users
- comments - to post and delete comments on a user’s behalf
- relationships - to follow and unfollow accounts on a user’s behalf
- likes - to like and unlike media on a user’s behalf
https://api.instagram.com/oauth/authorize/?client_id=CLIENT-ID&redirect_uri=REDIRECT-URI&response_type=code
- client_id: your client id
- client_secret: your client secret
- grant_type: authorization_code is currently the only supported value
- redirect_uri: the redirect_uri you used in the authorization request. Note: this has to be the same value as in the authorization request.
- code: the exact code you received during the authorization step.