This code looks good, but it shouldn't be in a controller. I would move this into a module or class in a file like ```lib/instagram.rb``` and call it from the controller with something like:

```Instagram.GetPhotos```