ushios/tumblr

Ushios Tumblr Component

0.0.3 2013-10-29 18:12 UTC

This package is not auto-updated.

Last update: 2024-12-17 01:27:39 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