定制 bramdeleeuw/silverstripe-instagram 二次开发

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

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

bramdeleeuw/silverstripe-instagram

Composer 安装命令:

composer require bramdeleeuw/silverstripe-instagram

包简介

Link your instagram account to you SilverStripe site and query the instagram api

README 文档

README

Add support for the Instagram Basic Display API to your website. Creates a tab in on the Member section where content authors can authenticate with your Instagram app. The module contains a task that fetches the authenticated member's images form instagram.

You can also paste a token from your app on developers.facebook.com with the User Token Generator. That way you can easily set up a connection for a client, your client only needs to accept the invitation from your facebook app.

Installation

Install the module trough composer

composer require bramdeleeuw/silverstripe-instagram

Set up your app in developers.facebook.com and follow these instructions to add the Instagram Basic API. After completing step 3 you should have an app set up with at least one test user and a app_id and app_secret. From the test users overview you can also generate a user token so you don't have to authorise trough the CMS.

Configure the app_id and app_secret in your yml config. Or you can use the CMS Setting to connect with your app.

Broarm\Instagram\InstagramClient:
  app_id: 'YOUR_APP_ID'
  app_secret: 'YOUR_APP_SECRET'

Next authorize your user so you can read their feed. Each member can be connected to their own feed, so you can read the feed from multiple users. Go to the Security admin and select the member you want to connect to instagram. Here you hava a button to authenticate instagram, this will redirect to a Instagram authentication screen where the user can connect themselves (make sure you are loggen in with the account you want to connect). Or you have the option to paste a generated user token, after a save you should see the profile is connected.

Available methods

The default behaviour runs a task that checks media from authenticated users. This data gets stored in Broarm\Instagram\Model\InstagramMediaObject's. The simplest way to get started would by by running the task either by cron or by hand and querying the Broarm\Instagram\Model\InstagramMediaObject.

But you could also create your own tasks or, request the api directly, with the following methods.

$member = Security::getCurrentUser();
$instagram = new \Broarm\Instagram\InstagramClient($member->InstagramAccessToken);
 
// Get the media from the user connected to the access token
$instagram->getUserMedia();

// Get the media for the given user id
$instagram->getUserMedia($member->InstagramID); 

// The above calls return a simple array with media id's 
// Use this call to get the media for the given id
$instagram->getMedia($id);

bramdeleeuw/silverstripe-instagram 适用场景与选型建议

bramdeleeuw/silverstripe-instagram 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 982 次下载、GitHub Stars 达 6, 最近一次更新时间为 2016 年 02 月 23 日, 在 PHP 生态内属于活跃度较高的组件。

它主要适用于以下技术方向: 「media」 「api」 「instagram」 「silverstripe」 「social media」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。

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

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

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

BUG 修复 & 性能优化

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

项目外包 & 长期维护

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

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

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: BSD-3-Clause
  • 更新时间: 2016-02-23