定制 mingalevme/twapponator 二次开发

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

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

mingalevme/twapponator

最新稳定版本:1.0.0

Composer 安装命令:

composer require mingalevme/twapponator

包简介

TWitter APPlication ONly authenticATOR

README 文档

README

Weclcome

Twapponator - Very simple PHP Twitter Application Only Authentication Client.

Travis CI

Build Status

Codecov

codecov

Installing via Composer

The recomended way to install Twapponator is through Composer.

# Install Composer
curl -sS https://getcomposer.org/installer | php

# Add Twapponator as a dependency
php composer.phar require mingalevme/twapponator

After installing, you need to require Composer's autoloader:

require 'vendor/autoload.php';

Dependencies

"php": ">=5.3.0"
"ext-curl": "*"

Basic Usage

Once installed you can easily access all of the Twitter API endpoints supported by Application Only Authentication. You can view those enpoints here.

<?php

// Obtain Bearer Token (if needed)
$token = \Twapponator\Twapponator::obtainBearerToken('consumer_key', 'consumer_secret');

// Now you can cache it for future use
$someCacheStorage->set('twitter_bearer_token', $token);


// Init Twapponator Object
$twapponator = new \Twapponator\Twapponator($token);

// Request API Endpoint data
try {
    $data = $twapponator->request('https://api.twitter.com/1.1/statuses/show.json?id=' . $someTweetId);
} catch (\Twapponator\Exception $e) {
    echo $e->getMessage();
    exit();
}

// For some endpoints there are shortcuts.
// See list of available shortcuts in \Twapponator\Client class source code.
// Next row is equal to $twapponator->request('https://api.twitter.com/1.1/statuses/show.json?id=' . $someTweetId);
$data = $twapponator->status($someTweetId);

echo $response;

Unit Testing

Coming Soon

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2016-01-27

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固