vosonlab / SocialMediaLab

46 stars 19 forks source link

authentication error with instagram collection (Windows 7, R 3.1.1, Firefox default browser) #11

Open rjackland opened 8 years ago

rjackland commented 8 years ago

Running the following line from the tutorial:

g_instagram_ego_senators <- 
Authenticate("instagram", appID = myAppId, appSecret = myAppSecret) %>%
  SaveCredential("InstagramCredential.RDS") %>%
  Collect(ego = TRUE, username = c("adam_kinzinger","senatorreid")) %>% 
  Create

did open the browser (after pressing enter, as usual), but once I'd authenticated with Instagram, I got the following message in the browser:

{"code": 400, "error_type": "OAuthException", "error_message": "Redirect URI does not match registered redirect URI"}

As we've seen, it works fine with Linux and Mac, but maybe we need to adjust something for Windows.

Note: with IE as the default browser, I didn't even get this far, but I don't think we need to support IE.

This is not urgent.

timothyjgraham commented 8 years ago

I have tested it with my API credentials and everything worked OK. Have sent you an email with my creds, so you can verify. Sounds like the redirect URI needs to be amended. It is usually http://localhost:1410/, but it could be something else depending on your setup.

rjackland commented 8 years ago

Thanks - I should have mentioned that I tested it straight after with Linux machine and my creds and it worked fine, so it is to do with Win7 setup, I think. I'll try a VM with Win7 and see if I can provide any further debug info. I guess my concern is that http://localhost:1410/ may not be a valid URL for Win machine?

timothyjgraham commented 8 years ago

Ahh, OK. Perhaps try http://127.0.0.1 instead of localhost ?

timothyjgraham commented 8 years ago

@rjackland - you could check out some of the solutions on this page. https://www.drupal.org/node/2140479