PhantomAppDevelopment / socialmedia-as3

Authenticate users from social media networks into your Adobe AIR projects. Including Facebook, Twitter and Google+
MIT License
14 stars 2 forks source link

Can't get access token on Instagram #2

Open alamboley opened 7 years ago

alamboley commented 7 years ago

Hey,

Many thanks for those nice examples!

When I received the code and call getAccessToken(), I got:

Error #2044: Unhandled ioError:. text=Error #2032: Stream Error. URL: https://api.instagram.com/oauth/access_token

Any ideas?

agentphantom commented 7 years ago

I have an idea, please add the following code and tell me what outputs in the console:

accessTokenLoader.addEventListener(IOErrorEvent.IO_ERROR, errorHandler);

private function errorHandler(event:flash.events.IOErrorEvent):void
{
    trace(event.currentTarget.data);
}
alamboley commented 7 years ago

Hmm indeed, I got: {"error_type": "OAuthException", "code": 400, "error_message": "Redirect URI doesn't match original redirect URI"}

The original REDIRECT_URI contains ?id=myId which is dynamic. So it can't exactly be the same with the dev portals. Instagram doesn't support it?

The REDIRECT_URI never change during the process.