hautelook/instagram-bundle

此扩展包允许在 Symfony 环境中支持 Instagram API。

此包的官方仓库似乎已消失,因此包已被冻结。

安装数: 49,178

依赖项: 0

建议者: 0

安全性: 0

星标: 3

关注者: 18

分支: 5

开放问题: 3

类型:symfony-bundle

dev-master 2014-05-29 16:28 UTC

This package is not auto-updated.

Last update: 2022-01-17 17:02:15 UTC


README

用于与 Instagram API 一起工作的 Symfony2 扩展包。

Build Status

简介

此扩展包提供了一个新的扩展包,它使用 Instaphp 库来利用 Instagram API。

安装

假设您已安装 composer.phar 或 composer 二进制文件(或将它添加到 composer.json 并运行 composer install)

$ composer require hautelook/instagram-bundle

您可以选择 dev-master,或使用更稳定的标签(出于各种原因推荐)。在 Github 仓库Packagist 上,您总能找到最新的标签。

现在将扩展包添加到您的 Kernel 中

<?php
// app/AppKernel.php

public function registerBundles()
{
    $bundles = array(
        // ...
        new Hautelook\InstagramBundle\HautelookInstagramBundle(),
        // ...
    );
}

配置

您可以通过定义来配置扩展包

# app/config/hautelook_instagram.yml

hautelook_instagram:
    instaphp_params:
        client_id: <your client id>
        client_secret: <your client secret>
    user_id: <your user id>

使用方法

只需获取管理服务并调用 getRecent。示例

<?php

namespace Acme\DemoBundle;

class SomeController extends Controller
{
    public function someAction()
    {
        $instagramManager = $this->get('hautelook_instagram.manager');
        $posts = $instagramManager->getRecent(5);
    }
}

未来和待办事项

  • 清理
  • 添加更多功能