定制 admench/craft-instagram 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

admench/craft-instagram

Composer 安装命令:

composer require admench/craft-instagram

包简介

Simple Instagram Api endpoint for Craft CMS - intended for Javascript to consume as AJAX post request, returning users feed

README 文档

README

Craft Instagram Api guzzle endpoint plugin for JS to consume as AJAX

Screenshot

Requirements

This plugin requires Craft CMS 3.0.0-beta.23 or later.

Installation

To install the plugin, follow these instructions.

  1. Open your terminal and go to your Craft project:

     cd /path/to/project
    
  2. Then tell Composer to load the plugin:

     composer require admench/craft-instagram
    
  3. In the Control Panel, go to Settings → Plugins and click the “Install” button for Craft Instagram.

Craft Instagram Overview

Simple Instagram Api endpoint for Craft CMS - intended for Javascript to consume as AJAX post request, returning users feed

Configuring Instagram Api

Make sure you create a .env variable with your Instagram Access Token as INSTAGRAM_ACCESS_TOKEN

Make sure you create a .env variable with your required number of posts as INSTAGRAM_COUNT

Using Instagram Api

Here is an example Vue Component which consumes the endpoint /actions/instagram-api/feed:

<script>
export default {
	props: ["csrfToken"],
	data() {
		return {
			instagramFeed: {
				data: [],
				meta: {
					code: null
				},
				pagination: {}
			}
		};
	},
	created() {
		var qsparams = qs.stringify({
			CRAFT_CSRF_TOKEN: this.csrfToken
		});
		axios
			.post("/actions/craft-instagram/feed", qsparams)
			.then(response => {
				this.instagramFeed = response.data;
			})
			.catch(e => {
				this.instagramFeed = e;
				console.log("error: " + e);
				console.log(e);
			});
	}
};
</script>

<template>
    <div>

		<div>
			<img v-for="post in instagramFeed.data" :src="post.images.thumbnail.url">
		</div>

		// See what the response is
		<pre>
			{{ instagramFeed }}
		</pre>

	</div>
</template>

Instagram Api Roadmap

Some things to do, and ideas for potential features:

  • Release it

Brought to you by Adam Menczykowski

统计信息

  • 总下载量: 45
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 10
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2018-02-15

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固