-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Instagram: Support passing in API url #6398
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Instagram API was updated.
Codecov Report
@@ Coverage Diff @@
## master #6398 +/- ##
========================================
Coverage 93.98% 93.98%
========================================
Files 169 169
Lines 11687 11828 +141
========================================
+ Hits 10984 11117 +133
- Misses 703 711 +8
Continue to review full report at Codecov.
|
Thanks for the PR. Do they have any "test api" that we can use in our tests so we can make sure that it is always working? |
Old api is not working, i made tests. new api can be tested directly from browser also. I updated access_token, just for test purposes. |
I've noticed that Instagram is not allowing anymore to setup new projects to use the old style but it is still working for the ones that have it already setup. I'm afraid to update it here and some apps stop working. Maybe we should support both apis. @dplewis what do you think? |
I would support both. Perhaps add api url to the AuthData to specify which API is used. |
@maravilhosinga would it be possible to be changed? |
Instagram API was updated and is not allowing anymore to setup new projects to use the old style but it is still working for the ones that have it already setup. New docs are listed here: https://developers.facebook.com/docs/instagram-basic-display-api/ I've added support for both old and new API To use new API just add new field "api_type" = "new_api" in client side. For old API just no changes needed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I updated to support both instagram API version, old and new.
@davimacedo i have updated to support both old and new API. please check. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A quick change and we should be good. Can you revert the styling?
src/Adapters/Auth/instagram.js
Outdated
|
||
// A promisey wrapper for old api requests | ||
function requestOld(path) { | ||
return httpsRequest.get('https://api.instagram.com/v1/' + path); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We were referring to passing in the api endpoint. This way if a new endpoint is release we won't have to update the server again.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The problem is that not everyone is able to know witch endpoint to pass, that solution will be complicated most of devs or just Parse Server lovers.
for example i sell sources code on codecanyon.net and almost 80% of buyers, are not developers, they use to follow documentations to setup their apps.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The old api will be defaulted (if no endpoint is passed in). If you want to use a newer endpoint pass it in. This will also enable backwards compatibility.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok
@maravilhosinga Thanks for getting started on this. Feel free to test the changes I made by passing in @davimacedo @acinader How does this look? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
The new Instagram documentation indicates:
Does that mean that Instagram Auth Adapter (with the new url) can't be used anymore for signup? |
Instagram API was updated.
Old API is not working anymore.
New docs are listed here: https://developers.facebook.com/docs/instagram-basic-display-api/