alanmonger/socialite

This package is abandoned and no longer maintained. No replacement package was suggested.

Simple social media wrapper

1.0.2 2015-01-12 22:46 UTC

This package is not auto-updated.

Last update: 2022-02-19 03:01:44 UTC


README

SensioLabsInsight #Socialite

Socialite is a social media component which allows posting to popular social media platforms either independently or in bulk.

Single Post Use

###Posting to facebook

    $facebook = Socialite\Service\ServiceFactory::facebook($appId, $appSecret);

    $message = new Socialite\Message();
    $message->setBody("Test Post");

    $facebook->post($message);

###Posting to Twitter

    $twitter = ServiceFactory::twitter($consumerKey, $consumerSecret, $token, $tokenSecret);

    $message = new Socialite\Message();
    $message->setBody("Test Post");

    $twitter->post($message);

Bulk Post

    $twitter    = \Socialite\Service\ServiceFactory::twitter($consumerKey, $consumerSecret, $token, $tokenSecret);
    $facebook   = \Socialite\Service\ServiceFactory::facebook($appId, $appSecret);
    $post       = new \Socialite\Message();

    $post->setBody("test");

    $bulk = new \Socialite\Post\Bulk;

    $bulk
        ->addPost($twitter)
        ->addPost($facebook)
        ->send($post)
    ;