Open quinncnl opened 8 years ago
The code contains hardcoded Client ID. You can apply the following patch:
diff --git a/get_token.py b/get_token.py
index aa4626a..024e024 100644
--- a/get_token.py
+++ b/get_token.py
@@ -27,7 +27,7 @@ def homepage():
code = request.args.get('code', None)
if code is None:
- return render_template('homepage.html')
+ return render_template('homepage.html', client_id=ID)
else:
token, user_data = \
instagram.exchange_code_for_access_token(code)
diff --git a/templates/homepage.html b/templates/homepage.html
index 817a21c..76dff14 100644
--- a/templates/homepage.html
+++ b/templates/homepage.html
@@ -1,5 +1,5 @@
{% extends "base.html" %}
{% block body %}
- <a href='https://instagram.com/oauth/authorize/?client_id=749fd37ef1314c69ba2c65711acd8f2c&redirect_uri=http://localhost:4726/&response_type=code'>click to get auth token</a>
+ <a href='https://instagram.com/oauth/authorize/?client_id={{ client_id }}&redirect_uri=http://localhost:4726/&response_type=code'>click to get auth token</a>
{% endblock %}
Hello,
I encountered this problem with the following traces:
Any ideas on how to fix it?