Skip to content
This repository has been archived by the owner on Feb 8, 2022. It is now read-only.

amonger/socialite

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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)
    ;

About

Social Media Component

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages