thoughtco/statamic-instagram 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

thoughtco/statamic-instagram

最新稳定版本:v1.1.0

Composer 安装命令:

composer require thoughtco/statamic-instagram

包简介

README 文档

README

Statamic Instagram lets you pull down users media and profiles from within your Statamic site.

How to Install

Run the following command from your project root:

composer require thoughtco/statamic-instagram

Configuration

A configuration file can be published by running the following command:

php artisan vendor:publish --tag=statamic-instagram-config

This will create statamic-instagram.php in your config folder.

Usage

This package provides a light wrapper around https://github.com/pgrimaud/instagram-user-feed, which uses web scraping to get Instagram posts. This means you don't need to set up a Facebook or Instagram App to access it.

It requires an Instagram username and password to pull down data - you should create a throwaway Instagram account for this rather than using an actual account. Add the username and password to your .env:

STATAMIC_INSTAGRAM_USERNAME and STATAMIC_INSTAGRAM_PASSWORD.

Tag

This package provides an {{ instagram }} tag:

{{ instagram profile="robertdowneyjr" limit="6" as="ig" }}
    <div>
        {{ ig }}
            {{ media }}
            <a href="{{ link }}" >
                <img src="{{ thumbnailSrc }}" alt="{{ caption }}" />
            </a>
            {{ /media }}
        {{ /ig }}
    </div>
{{ /instagram }}

API

This package exposes the API provided by the instagram-user-feed package, so you can call any of the methods on it, eg:

app(\Instagram\Api::class)->getProfile('robertdowneyjr');

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: Unknown
  • 更新时间: 2024-10-23