ushios/tumblr

Ushios Tumblr Component

Installs: 8

Dependents: 0

Stars: 1

Watchers: 1

Forks: 1

Language: PHP

0.0.3 2013-10-29 18:12 UTC

README

tumblr extensions.

Dependencies

Usage

Reblogger

# reblogger.php

<?php
use Ushios\Component\Tumblr\Reblog\Reblogger;
use Ushios\Component\Tumblr\Reblog\Strategy\AllReblogStrategy;

$reblogger = new Reblogger();
$client = new Tumblr\API\Client(CONSUMER_KEY, CONSUMER_SECRET);
$client->setToken(TOKEN, TOKEN_SECRET);
$reblogger->setClient($client);

$strategy = new AllReblogStrategy(); // or ReblogStrategyInterface sub class.
$reblogger->setReblogStrategy($strategy);

$reblogger->reblog(BLOG_NAME, (array)$post); // reblog post