PHP code example of guysolamour / laravel-hootsuite
1. Go to this page and download the library: Download guysolamour/laravel-hootsuite library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
/*
Available in your hootsuite dashboard
*/
HOOTSUITE_CLIENT_ID=your_hootsuite_client_id
/*
Available in your hootsuite dashboard
*/
HOOTSUITE_CLIENT_SECRET=your_hootsuite_client_secret
/*
Only the url path
A route will be create with this url path
The redirect uri domain must be your website domain
*/
HOOTSUITE_REDIRECT_URI=your_hootsuite_redirect_uri
BITLY_ACCESS_TOKEN=your_bitly_secret_access_token
'bitly_text_link' => true, // for the publication main link
'bity_all_links' => true, // for all links in publication text
use Guysolamour\Hootsuite\Facades\Hootsuite;
Hootsuite::publish([
'text' => "This is a text", // r "this,is,a,hashtag"
'networks' => "Facebook, Twitter, Linkedin", //
use Guysolamour\Hootsuite\Facades\Hootsuite;
Hootsuite::schedule([
'text' => "This is a text", // this,is,a,hashtag"
'networks' => "Facebook, Twitter, Linkedin",
'media' => 'https://domain.com/imagelink.jpg', // ['mediaUrl1', 'mediaUrl2']
'link' => 'https://link.com',
'schedule_at' => '2021-01-15 08:59:12' // or carbon instance |
use Guysolamour\Hootsuite\Facades\Hootsuite;
Hotsuite::destroy(int $messageId) :bool;
use Guysolamour\Hootsuite\Facades\Hootsuite;
Hootsuite::user();
use Guysolamour\Hootsuite\Facades\Hootsuite;
Hootsuite::messageIsStillScheduled(int $messageId);
use Guysolamour\Hootsuite\Facades\Hootsuite;
Hootsuite::getMessage(int $messageId);
use Guysolamour\Hootsuite\Facades\Hootsuite;
// Get
Hootsuite::get(string $url);
// Post
Hootsuite::post(string $url);
// Put
Hootsuite::put(string $url);
// Delete
Hootsuite::delete(string $url);