zumzum zumzum - 1 year ago 109
iOS Question

iOS Instagram login get Instagram user id?

I am writing an iOS app that needs to do some basic work against the "Instagram API". To login a user I simply hit the "URL":

I do this through a web view. I am able to login the user and get the access token from "Instagram".

So my question is:

I want to be able to know the "Instagram userId" of the user I just logged in.

How can I get the user id?

Answer Source

The user_id is in the first part of access_token


user_id = access_token.split(".")[0];