
Vue Instagram
Instagram feed fetcher component based on Vue.js
6K viewsAdded Jan 17, 2019
Instagram feed fetcher component based on Vue.js
Installation
Install via CDN
<script src="https://unpkg.com/vue"></script>
<script src="https://unpkg.com/vue-instagram"></script>
<script>
Vue.use(VueInstagram.default)
</script>
Install via NPM
npm install vue-instagram --save
Register as Component
import Vue from 'vue'
import VueInstagram from 'vue-instagram'
export default {
name: 'App',
components: {
VueInstagram
}
}
Register as Plugin
import Vue from 'vue'
import VueInstagram from 'vue-instagram'
Vue.use(VueInstagram)
Usage
<template>
<vue-instagram token="accessTokenHere" :count="5" :tags="['hashtag1', 'hashtag2']" mediaType="image">
<template slot="feeds" slot-scope="props">
<li class="fancy-list"> {{ props.feed.link }} </li>
</template>
<template slot="error" slot-scope="props">
<div class="fancy-alert"> {{ props.error.error_message }} </div>
</template>
</vue-instagram>
</template>
<script>
import VueInstagram from 'vue-instagram'
export default {
name: 'App',
components: {
VueInstagram
}
}
</script>




