Giter VIP home page Giter VIP logo

Comments (3)

danchristian avatar danchristian commented on July 20, 2024 3

I got it working with Nuxt 2.2.0 with the following:

/plugins/vue-instagram.js

import Vue from 'vue'
import VueInstagram from 'vue-instagram'

Vue.use(VueInstagram)

/nuxt.config.js

plugins: [
  { src: '~/plugins/vue-instagram', ssr: false }
]

Then you can use it like so. You don't need to import the plugin in your Vue component as it's already defined in the Vue instance.

<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>
</script>

from vue-instagram.

kevinongko avatar kevinongko commented on July 20, 2024

try to use the component as client-side only

<script>
let VueInstagram

if (process.BROWSER_BUILD) {
  VueInstagram = require('vue-instagram')
}

export default {
  name: 'App',

  components: {
    VueInstagram
  }
}
</script>

from vue-instagram.

pit07 avatar pit07 commented on July 20, 2024

Thanks @danchristian , but i have a No Access Control Allow Origin with this method :(
Any ideas?
Thanks ;)

from vue-instagram.

Related Issues (20)

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.