Giter Club home page Giter Club logo

angular-instafeed's Introduction

Angular Instafeed

Personal Instagram Angular.js Feed

Made by Joe Carlson - 2016 See more at www.callmejoe.net

Basic example usage of factory method to make a request to the instagram api to get a certian amount of images with an Angular.js switchable grid.

###Update This project has been converted into an NPM package Check it out here.

Check out a live demo of this plugin here

Reviews

"Oh yes. Absolutely spot on ... works like a charm... The cleanest plugin i've ever worked with - clean, straightforward and works out of box." - tenzopro

instfeed-demo

Installing

  • Download and unpack Angular Instafeed. Or alternatively checkout from source:

    $ git clone https://github.com/JoeKarlsson1/Angular-Instafeed
    $ cd angular-instafeed
  • Next, inside the project, you need to register as a Instagram Developer to get your Client ID

  • You will be creating a Instagram feed using the Instagram API and Angular 1.5. The feed will feature a switchable grid to change the layout of the photos on the page [see Style Guide below for details].

Before you start building out your Angular web application, you will need to sign up to be an Instagram Developer:

  1. First go register as an Instagram Developer to get your Client ID.

  2. You will also need to get your user ID go run this program. To get your User ID, go to this site and enter your Instagram user name to get your user ID.

* Note: Your User ID is different than your User Name. Your User ID is a string that looks like `12345678`
* Note: If you do not have an Instagram account, find an account that you enjoy and use their photos for your feed.
  1. Create an index.html with an HTML5 template in a new directory, and fire up http-server we will need this in order to get our auth token. * Start your server, and copy the URL. * Go to your Manage Clients on the Instagram API settings, click Manage on your project, then click on the Security Tab and enter your server URL into the Valid Redirect URIs.

  2. This is the weird step - since we are making a client side web application, we need to get a pre-approved access-token from Instagram. Here's how you do it:

* **Step One:** Direct your user to our authorization URL (Be sure to replace `CLIENT_ID` with your client ID and `REDIRECT_URI` with the url you pasted in the step above)

      https://api.instagram.com/oauth/authorize/?client_id=CLIENT_ID&redirect_uri=REDIRECT_URI&response_type=token

  At this point, we present the user with a login screen and then a confirmation screen where they grant your app’s access to their Instagram data. Note that unlike the explicit flow the response type here is “token”.

* **Step Two:** Receive the access_token via the URL fragment

  Once the user has authenticated and then authorized your application, Instagram redirects them to your redirect_uri with the access_token in the url fragment. It will look like this:

      http://your-redirect-uri#access_token=ACCESS-TOKEN

  Simply grab the access_token off the URL fragment and you’re good to go. If the user chooses not to authorize your application, you’ll receive the same error response as in the explicit flow
  1. Once you get your user id and your access_token, try hitting this route to get your most recent Instagram photos (Be sure to replace your USER_ID with your user ID and ACCESS_TOKEN with the access token you got in the step above).

    https://api.instagram.com/v1/users/USER_ID/media/recent/?count=99&&callback=JSON_CALLBACK&access_token=ACCESS_TOKEN

  2. Now, you're ready to starting building your Instagram Feed in Angular 2.0 ✨

Note: If you are instested in installing this via NPM, I got cha covered. Check it out here.

##Contributing

  1. Fork it!
  2. Create your feature branch: git checkout -b my-new-feature
  3. Commit your changes: git commit -am 'Add some feature'
  4. Push to the branch: git push origin my-new-feature
  5. Submit a pull request :D

See more at www.callmejoe.net

angular-instafeed's People

Contributors

joekarlsson avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.