public function run($request)
 {
     echo 'Begin (if you do not see "Finished" below, the import has crashed!)<br />';
     SocialMedia::Fetch(true);
     echo 'Finished';
 }
Example #2
0
 function outputSocialMediaForm()
 {
     $socialMediaForm = "";
     $extra = $this->getSocialMediaDataArray();
     $objSM = new SocialMedia();
     $smAccounts = $objSM->toArray();
     foreach ($smAccounts as $account) {
         $accountName = strtolower($account['name']);
         $socialMediaForm .= "<label for='social-{$accountName}'>{$account['name']}</label>";
         $socialMediaForm .= "<input type='text' name='social-{$accountName}' value='{$extra[$accountName]}' />";
     }
     return $socialMediaForm;
 }
Example #3
0
<?php

/*
 * This file is part of the Social Pushing from Jeroen Desloovere.
 *
 * For the full copyright and license information, please view the license
 * file that was distributed with this source code.
 */
use SocialMedia\Types\Post;
use SocialMedia\Types\Service;
// define api
$api = new SocialMedia();
// define external post objects
$service = new FacebookService();
$post = new FacebookPost();
// (un)publish a message
$api->getTimeline()->publish($service, $post);
$api->getTimeline()->unpublish($service, $post);