Comments (6)
Also, documentation on Instagram (you can see the console here: https://instagram.com/developer/api-console/) shows that a request would be to "https://api.instagram.com/v1/users/self" for the data of the person who logged in, or a specific ID in place of 'self' would retrieve data for that user.
from oauthswift.
You can find the example of api request in ViewController.swift. Look into func doOAuthInstagram().
let url :String = "https://api.instagram.com/v1/users/1574083/?access_token=\(credential.oauth_token)"
let parameters :Dictionary = Dictionary<String, AnyObject>()
oauthswift.client.get(url, parameters: parameters,
success: {
data, response in
let jsonDict: AnyObject! = NSJSONSerialization.JSONObjectWithData(data, options: nil, error: nil)
println(jsonDict)
}, failure: {(error:NSError!) -> Void in
println(error)
})
Just change url in the get request.
from oauthswift.
omg.. i didn't know instagram had a users/self !@@ ill check that right now!! thnx!
from oauthswift.
i got it!, How can i send a deauthententicate to instagram, like... the user wants to log out..
from oauthswift.
You may want to look into SwiftyJSON. Makes JSON parsing super simple, and that gets you pretty much everything from your IG response object.
https://github.com/SwiftyJSON/SwiftyJSON/tree/master
from oauthswift.
@hopye please close this issue, initial question has been answered
for a new question new issue but I can try to repond.
The User doesn't logout, its just you that do not use the token anymore
There is no "revoke token" currently in instagram api ( https://instagram.com/developer/authentication/ ) to invalidate token and maybe no expiration time that can be specified by you
from oauthswift.
Related Issues (20)
- /Package.swift has no Package.swift manifest for version 0.6.0 in https://github.com/OAuthSwift/OAuthSwift HOT 1
- does Slack api return User Token? HOT 1
- Can't allow cookies for url request
- how can I send http request with url scheme? HOT 1
- Small buttons after login on webview OAuth2
- Twitch Dev URL Scheme Issue HOT 2
- OAuthSwiftError -10 after canceling redirection to app HOT 3
- Connot Run on Linux HOT 3
- OAuthSwift authorize : States not equal in response. HOT 1
- Canceling Apple ID isn't handled
- Swift Concurrency HOT 1
- Call to /request_token after canceling a request fails with HTTP 401 because oauth_token is already set.
- Cannot redirect to the app after autosubmit credentials HOT 4
- the closure for the authorize function callback is not being executed at all. HOT 2
- url scheme no works,debug out HOT 2
- Twitter SignIn - SessionStorage Error HOT 3
- A
- visionOS Support HOT 1
- Trying to use different JSON properties in token result HOT 1
- Does not work with Zotero Oauth HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from oauthswift.