Flutter : Not getting code while Instagram login (Instagram login not working) The 2019 Stack Overflow Developer Survey Results Are In Unicorn Meta Zoo #1: Why another podcast? Announcing the arrival of Valued Associate #679: Cesar Manara The Ask Question Wizard is Live! Data science time! April 2019 and salary with experienceHow to POST API URL with parameters to Instagram APIHow can I get a user's media from Instagram without authenticating as a user?Instagram iOS API Error Domain=WebKitErrorDomain Code=102 “Frame load interrupted”Unable to get code paramteter in redirect uri for instagramRedirect URI not passing variableNo redirect to callback URL when authenticating to InstagramInstagram php laravel access tokenApache Oltu Instragram integration doesn't return access_token… why?Android Instagram login integrationInstagram API call to retrieve authorization code with CURL returns empty
For what reasons would an animal species NOT cross a *horizontal* land bridge?
How to read αἱμύλιος or when to aspirate
What's the point in a preamp?
Simulating Exploding Dice
What force causes entropy to increase?
Are spiders unable to hurt humans, especially very small spiders?
Keeping a retro style to sci-fi spaceships?
Are there continuous functions who are the same in an interval but differ in at least one other point?
Python - Fishing Simulator
How did the audience guess the pentatonic scale in Bobby McFerrin's presentation?
Why doesn't a hydraulic lever violate conservation of energy?
Did the new image of black hole confirm the general theory of relativity?
Single author papers against my advisor's will?
How to support a colleague who finds meetings extremely tiring?
Sub-subscripts in strings cause different spacings than subscripts
Windows 10: How to Lock (not sleep) laptop on lid close?
What information about me do stores get via my credit card?
Separating matrix elements by lines
How to determine omitted units in a publication
Student Loan from years ago pops up and is taking my salary
How to politely respond to generic emails requesting a PhD/job in my lab? Without wasting too much time
Am I ethically obligated to go into work on an off day if the reason is sudden?
Can each chord in a progression create its own key?
Does Parliament hold absolute power in the UK?
Flutter : Not getting code while Instagram login (Instagram login not working)
The 2019 Stack Overflow Developer Survey Results Are In
Unicorn Meta Zoo #1: Why another podcast?
Announcing the arrival of Valued Associate #679: Cesar Manara
The Ask Question Wizard is Live!
Data science time! April 2019 and salary with experienceHow to POST API URL with parameters to Instagram APIHow can I get a user's media from Instagram without authenticating as a user?Instagram iOS API Error Domain=WebKitErrorDomain Code=102 “Frame load interrupted”Unable to get code paramteter in redirect uri for instagramRedirect URI not passing variableNo redirect to callback URL when authenticating to InstagramInstagram php laravel access tokenApache Oltu Instragram integration doesn't return access_token… why?Android Instagram login integrationInstagram API call to retrieve authorization code with CURL returns empty
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;
I am using flutter and I want to achieve log in with Instagram in my app.
So I am following this tutorial for Instagram login,
I am getting success to log in but not getting user details, it is opening Redirect URI (https://www.google.com/) and not getting the code and access token.
Please help me if you know anything.
Note: I am using flutter_webview_plugin for load webview in
flutter.
Here is the code which is opening webview for Instagram login ->
My log print("Code ========== Code"); is not going to print anymore
Future<Token> getToken(String appId, String appSecret) async
Stream<String> onCode = await _server();
print("_server ========== _server");
String url =
"https://api.instagram.com/oauth/authorize?client_id=$appId&redirect_uri=https://www.google.com/&response_type=code";
final flutterWebviewPlugin = new FlutterWebviewPlugin();
flutterWebviewPlugin.launch(url);
final String code = await onCode.first;
print("Code ========== Code");
print("Code -> "+code);
final http.Response response = await http.post(
"https://api.instagram.com/oauth/access_token",
body: "client_id": appId, "redirect_uri": "https://www.google.com/", "client_secret": appSecret,
"code": code, "grant_type": "authorization_code");
flutterWebviewPlugin.close();
return new Token.fromMap(json.decode(response.body));
Future<Stream<String>> _server() async
final StreamController<String> onCode = new StreamController();
HttpServer server =
await HttpServer.bind(InternetAddress.LOOPBACK_IP_V4, 8585);
server.listen((HttpRequest request) async
final String code = request.uri.queryParameters["code"];
request.response
..statusCode = 200
..headers.set("Content-Type", ContentType.HTML.mimeType)
..write("<html><h1>You can now close this window</h1></html>");
await request.response.close();
await server.close(force: true);
onCode.add(code);
await onCode.close();
);
return onCode.stream;
flutter instagram instagram-api flutterwebviewplugin
add a comment |
I am using flutter and I want to achieve log in with Instagram in my app.
So I am following this tutorial for Instagram login,
I am getting success to log in but not getting user details, it is opening Redirect URI (https://www.google.com/) and not getting the code and access token.
Please help me if you know anything.
Note: I am using flutter_webview_plugin for load webview in
flutter.
Here is the code which is opening webview for Instagram login ->
My log print("Code ========== Code"); is not going to print anymore
Future<Token> getToken(String appId, String appSecret) async
Stream<String> onCode = await _server();
print("_server ========== _server");
String url =
"https://api.instagram.com/oauth/authorize?client_id=$appId&redirect_uri=https://www.google.com/&response_type=code";
final flutterWebviewPlugin = new FlutterWebviewPlugin();
flutterWebviewPlugin.launch(url);
final String code = await onCode.first;
print("Code ========== Code");
print("Code -> "+code);
final http.Response response = await http.post(
"https://api.instagram.com/oauth/access_token",
body: "client_id": appId, "redirect_uri": "https://www.google.com/", "client_secret": appSecret,
"code": code, "grant_type": "authorization_code");
flutterWebviewPlugin.close();
return new Token.fromMap(json.decode(response.body));
Future<Stream<String>> _server() async
final StreamController<String> onCode = new StreamController();
HttpServer server =
await HttpServer.bind(InternetAddress.LOOPBACK_IP_V4, 8585);
server.listen((HttpRequest request) async
final String code = request.uri.queryParameters["code"];
request.response
..statusCode = 200
..headers.set("Content-Type", ContentType.HTML.mimeType)
..write("<html><h1>You can now close this window</h1></html>");
await request.response.close();
await server.close(force: true);
onCode.add(code);
await onCode.close();
);
return onCode.stream;
flutter instagram instagram-api flutterwebviewplugin
add a comment |
I am using flutter and I want to achieve log in with Instagram in my app.
So I am following this tutorial for Instagram login,
I am getting success to log in but not getting user details, it is opening Redirect URI (https://www.google.com/) and not getting the code and access token.
Please help me if you know anything.
Note: I am using flutter_webview_plugin for load webview in
flutter.
Here is the code which is opening webview for Instagram login ->
My log print("Code ========== Code"); is not going to print anymore
Future<Token> getToken(String appId, String appSecret) async
Stream<String> onCode = await _server();
print("_server ========== _server");
String url =
"https://api.instagram.com/oauth/authorize?client_id=$appId&redirect_uri=https://www.google.com/&response_type=code";
final flutterWebviewPlugin = new FlutterWebviewPlugin();
flutterWebviewPlugin.launch(url);
final String code = await onCode.first;
print("Code ========== Code");
print("Code -> "+code);
final http.Response response = await http.post(
"https://api.instagram.com/oauth/access_token",
body: "client_id": appId, "redirect_uri": "https://www.google.com/", "client_secret": appSecret,
"code": code, "grant_type": "authorization_code");
flutterWebviewPlugin.close();
return new Token.fromMap(json.decode(response.body));
Future<Stream<String>> _server() async
final StreamController<String> onCode = new StreamController();
HttpServer server =
await HttpServer.bind(InternetAddress.LOOPBACK_IP_V4, 8585);
server.listen((HttpRequest request) async
final String code = request.uri.queryParameters["code"];
request.response
..statusCode = 200
..headers.set("Content-Type", ContentType.HTML.mimeType)
..write("<html><h1>You can now close this window</h1></html>");
await request.response.close();
await server.close(force: true);
onCode.add(code);
await onCode.close();
);
return onCode.stream;
flutter instagram instagram-api flutterwebviewplugin
I am using flutter and I want to achieve log in with Instagram in my app.
So I am following this tutorial for Instagram login,
I am getting success to log in but not getting user details, it is opening Redirect URI (https://www.google.com/) and not getting the code and access token.
Please help me if you know anything.
Note: I am using flutter_webview_plugin for load webview in
flutter.
Here is the code which is opening webview for Instagram login ->
My log print("Code ========== Code"); is not going to print anymore
Future<Token> getToken(String appId, String appSecret) async
Stream<String> onCode = await _server();
print("_server ========== _server");
String url =
"https://api.instagram.com/oauth/authorize?client_id=$appId&redirect_uri=https://www.google.com/&response_type=code";
final flutterWebviewPlugin = new FlutterWebviewPlugin();
flutterWebviewPlugin.launch(url);
final String code = await onCode.first;
print("Code ========== Code");
print("Code -> "+code);
final http.Response response = await http.post(
"https://api.instagram.com/oauth/access_token",
body: "client_id": appId, "redirect_uri": "https://www.google.com/", "client_secret": appSecret,
"code": code, "grant_type": "authorization_code");
flutterWebviewPlugin.close();
return new Token.fromMap(json.decode(response.body));
Future<Stream<String>> _server() async
final StreamController<String> onCode = new StreamController();
HttpServer server =
await HttpServer.bind(InternetAddress.LOOPBACK_IP_V4, 8585);
server.listen((HttpRequest request) async
final String code = request.uri.queryParameters["code"];
request.response
..statusCode = 200
..headers.set("Content-Type", ContentType.HTML.mimeType)
..write("<html><h1>You can now close this window</h1></html>");
await request.response.close();
await server.close(force: true);
onCode.add(code);
await onCode.close();
);
return onCode.stream;
flutter instagram instagram-api flutterwebviewplugin
flutter instagram instagram-api flutterwebviewplugin
asked Mar 8 at 12:13
Mohit SutharMohit Suthar
2,77431841
2,77431841
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
Finally, I found the answer actually, This blog was right,
My mistake is changing Redirect URI
so i have change Redirect URI https://www.google.com/ to http://localhost:8585 and instagram login works.
Use http://localhost:8585 this Redirect URI for Instagram login
add a comment |
Your Answer
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55063019%2fflutter-not-getting-code-while-instagram-login-instagram-login-not-working%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
Finally, I found the answer actually, This blog was right,
My mistake is changing Redirect URI
so i have change Redirect URI https://www.google.com/ to http://localhost:8585 and instagram login works.
Use http://localhost:8585 this Redirect URI for Instagram login
add a comment |
Finally, I found the answer actually, This blog was right,
My mistake is changing Redirect URI
so i have change Redirect URI https://www.google.com/ to http://localhost:8585 and instagram login works.
Use http://localhost:8585 this Redirect URI for Instagram login
add a comment |
Finally, I found the answer actually, This blog was right,
My mistake is changing Redirect URI
so i have change Redirect URI https://www.google.com/ to http://localhost:8585 and instagram login works.
Use http://localhost:8585 this Redirect URI for Instagram login
Finally, I found the answer actually, This blog was right,
My mistake is changing Redirect URI
so i have change Redirect URI https://www.google.com/ to http://localhost:8585 and instagram login works.
Use http://localhost:8585 this Redirect URI for Instagram login
answered Mar 11 at 5:11
Mohit SutharMohit Suthar
2,77431841
2,77431841
add a comment |
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55063019%2fflutter-not-getting-code-while-instagram-login-instagram-login-not-working%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown