承接 mayoz/instagram 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

mayoz/instagram

最新稳定版本:1.0.0

Composer 安装命令:

composer require mayoz/instagram

包简介

Instagram SDK bridge for Laravel 5

README 文档

README

Introduction

To get started with Instagram, add to your composer.json file as a dependency:

    composer require mayoz/instagram

Configuration

After installing the Instagram library, register the Mayoz\Instagram\InstagramServiceProvider in your config/app.php configuration file:

    'providers' => [
        // Other service providers...

        Mayoz\Instagram\InstagramServiceProvider::class,
    ],

Also, add the Instagram facade to the aliases array in your app configuration file:

    'Instagram' => Mayoz\Instagram\Facades\Instagram::class,

You will also need to add credentials for the OAuth services your application utilizes. These credentials should be placed in your config/services.php configuration file with instagram key. For example:

    'instagram' => [
        'client_id'     => env('INSTAGRAM_KEY'),
        'client_secret' => env('INSTAGRAM_SECRET'),
        'redirect'      => env('INSTAGRAM_REDIRECT_URI'),
    ],

Basic Usage

Next, you are ready to use. Please see the following examples.

<?php

    namespace App\Http\Controllers;

    use Instagram;
    use Illuminate\Routing\Controller;

    class HomeController extends Controller
    {
        /**
         * Get the most popular Instagram medias.
         *
         * @return Response
         */
        public function getPopularMedia()
        {
            return (array) Instagram::getPopularMedia();
        }
    }

Documentation

This package is only bridge for Laravel5. Please check the Instagram PHP-API documents for more details.

License

THis package is licensed under The MIT License (MIT).

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2015-09-26