aniket-magadum/insta-feeds
Composer 安装命令:
composer require aniket-magadum/insta-feeds
包简介
README 文档
README
Display Instagram Posts on your website with ease. Use Coupon Code
FIRST10for 50% discount for first 10 users only.
This addon make's use of the Instagram Page Display API for fetching data via Instagram.
Features
- Provides you a tag which you use to render instagram posts in your template.
- Refresh the access token via schedular so you always keep fetching the latest content.
- Caching of the API response for faster rendering.
How to Install
You can search for this addon in the Tools > Addons section of the Statamic control panel and click install, or run the following command from your project root:
composer require aniket-magadum/insta-feeds
Remember! This is a paid addon so purchase a license before using it.
How to Use
Once the extension is installed we have to setup the INSTA_FEEDS_ACCESS_TOKEN and INSTA_FEEDS_CLIENT_SECRET in your .env file.
INSTA_FEEDS_ACCESS_TOKEN=ACCESS_TOKEN_HERE INSTA_FEEDS_CLIENT_SECRET=CLIENT_SECRET_HERE
In order to generate these tokens you can visit this Get Started Guide for Instagram Basic Display API
On the same page you have to create a long lived access token as below
Once you click on generate token button it will ask your instagram details and once done you will receive this access token.
Schedular
This addon requires the schedular to be running as it performs the following tasks to be run in the background.
- Caching of instagram posts for faster retrieval.
- Refreshing of the access token periodically so that we dont need to put in any manual efforts.
You can setup a schedular is not already running by Following the Laravel Documenation
As of now,
- Posts are cached every hour.
- Token is refreshed every month.
If you wish to customize these values please let me know. But believe me the defaults are the best.
Rendering the feeds
In order to render the feeds on the frontend we can make use of the {{ insta_feed }} tag . Here is an example snipped which you can use. We have also added a {{ nocache tag }} as it will prevent frontend caching of the page and make this template dynamic.
{{ nocache }}
{{ insta_feed limit="8"}}
<div class="mx-auto" style="margin-top: 30px;border: 2px solid black;">
<img src="{{ media_url }}" alt="{{ caption }}" style="height: 300px ;width: 300px;">
<p class="text-center"> {{ caption ?? 'No Caption Needed' }}</p>
</div>
{{ /insta_feed }}
{{ /nocache }}
aniket-magadum/insta-feeds 适用场景与选型建议
aniket-magadum/insta-feeds 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 295 次下载、GitHub Stars 达 0, 最近一次更新时间为 2022 年 12 月 12 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 aniket-magadum/insta-feeds 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 aniket-magadum/insta-feeds 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 295
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 14
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: Unknown
- 更新时间: 2022-12-12

