定制 austenc/statamic-instagram-feed 二次开发

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

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

austenc/statamic-instagram-feed

最新稳定版本:2.2.0

Composer 安装命令:

composer require austenc/statamic-instagram-feed

包简介

An instagram feed tag for Statamic

README 文档

README

Sorry folks, but this package is painful to maintain, because it's not an official way of connecting to Instagram. Since Instagram is constantly trying to discourage web scraping, it means fixes are often needed to respond to those changes. As of today (04/13/2022), this repository will be marked as deprecated.

A more "official" alternative is https://statamic.com/addons/lbeauvisage/instagram-user-feed-using-API.

If you insist on continuing down the rocky road of Instagram web scraping, see the following package (which always did the heavy lifting of this one, anyway): https://github.com/pgrimaud/instagram-user-feed

Feel free to reach out on Twitter if you want to take ownership of this repo.

Statamic Instagram Feed Statamic 3

📸 Easily embed an instagram feed in your Statamic site 📸

This version of the addon is only for Statamic 3+

This addon adds a fieldtype which gets images from instagram profiles. It uses web scraping under the hood, so beware, if Instagram changes something it may have issues! Generally, it's pretty stable.

For example:

{{ instagram_feed limit="3" }}
    <img src="{{ image }}">
{{ /instagram_feed }}

Requirements

  • Statamic 3
  • Instagram credentials for an account with Multi-factor auth turned OFF

Installation

Require the package with composer:

composer require austenc/statamic-instagram-feed

Configuration

It is recommended to create a dummy instagram account without Two Factor Authentication to use with this addon.

For more information, check out the underlying composer package.

You need to configure an Instagram username and password. Optionally, you can include a different profile for the feed to display.

Set the username/password .env file

INSTAGRAM_USERNAME='your-username'
INSTAGRAM_PASSWORD='your-password'
INSTAGRAM_PROFILE='profile-you-want-to-view'

The username and password do not have to match the profile displayed, as long as the account can view the profile.

Usage

After configuring your Instagram username and password, use the {{ instagram_feed }} tag:

{{ instagram_feed }}
    <img src="{{ image }}">
{{ /instagram_feed }}

You may also use the limit parameter to restrict the number of recent posts

Post Fields

Each post in the feed contains a number of fields for you to use.

Field Description
id The post's Instagram ID
image The URL of the image
caption The caption of the post
thumb The URL for the post's thumbnail
date The date it was posted
comments The total number of comments on the post
likes The total number of likes on the post
link The full URL to the post
height The image's height
width The image's width

Available Parameters

Option Default Value Description
limit 12 The number of recent posts to pull
profile null The Instagram profile to display

Support

Find a bug? Have a feature request? I'd be happy to help! Open an issue on github or reach out on twitter @austencam and I will get back to you when I can.

austenc/statamic-instagram-feed 适用场景与选型建议

austenc/statamic-instagram-feed 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 2.74k 次下载、GitHub Stars 达 6, 最近一次更新时间为 2020 年 07 月 01 日, 在 PHP 生态内属于活跃度较高的组件。

我们在过去多个企业项目中使用过 austenc/statamic-instagram-feed 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 austenc/statamic-instagram-feed 我们能提供哪些服务?
定制开发 / 二次开发

基于 austenc/statamic-instagram-feed 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 2.74k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 6
  • 点击次数: 11
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 6
  • Watchers: 2
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2020-07-01