I am building an iOS app with Instagram integration. what the redirect url should contain?

StackOverflow https://stackoverflow.com/questions/20353203

  •  25-08-2022
  •  | 
  •  

Question

I suppose that it should be an index.php file, but I can't find the code to be implemented...What I want to do is to open the Instagram login page in a webview, so I can receive the access token.

#define scope @"basic+likes+comments+relationships"
#define callbackURL @"http://test.com"
#define clientID @"c32e8dcf2482xxxxx"
#define clientSecret @"a9dxxxxxxxxx"


NSURL *url = [[NSURL alloc]initWithString:[NSString stringWithFormat:@"https://api.instagram.com/oauth/authorize/?client_id=%@&display=touch&scope=%@&redirect_uri=%@&response_type=code",clientID,scope,callbackURL]];
NSURLRequest *req = [[NSURLRequest alloc]initWithURL:url];
[webView loadRequest:req];

Thanks

Was it helpful?

Solution

your REDIRECT URI should be : "ig" + "your clientId" + "://authorize"

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top