Code Monkey home page Code Monkey logo

Comments (6)

gabriel-jones avatar gabriel-jones commented on May 16, 2024 1

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.

zavada avatar zavada commented on May 16, 2024

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.

hopye avatar hopye commented on May 16, 2024

omg.. i didn't know instagram had a users/self !@@ ill check that right now!! thnx!

from oauthswift.

hopye avatar hopye commented on May 16, 2024

i got it!, How can i send a deauthententicate to instagram, like... the user wants to log out..

from oauthswift.

ejpusa-zz avatar ejpusa-zz commented on May 16, 2024

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.

phimage avatar phimage commented on May 16, 2024

@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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.