Download the PHP package edujugon/social-auto-post without Composer

On this page you can find all versions of the php package edujugon/social-auto-post. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package social-auto-post

Social Auto Post

This is a lightly and easy to use package to post on your favorite social sites.

Social Sites Available:

Installation

type in console:

    composer require edujugon/social-auto-post

Or update your composer.json file.

"edujugon/social-auto-post": "1.0.*"

Then

composer install

Laravel 5.*

Register the Social service by adding it to the providers array.

'providers' => array(
    ...
    Edujugon\SocialAutoPost\Providers\SocialAutoPostServiceProvider::class
)

Let's add the Alias facade, add it to the aliases array.

'aliases' => array(
    ...
    'SocialAutoPost' => Edujugon\SocialAutoPost\Facades\SocialAutoPost::class,
)

Publish the package's configuration file to the application's own config directory

php artisan vendor:publish --provider="Edujugon\SocialAutoPost\Providers\SocialAutoPostServiceProvider" --tag="config"

Go to laravel facade sample directly.

Configuration

The default configuration for all Social sites is located in Config/Config.php

Before using this package you should create your app in your social site and then update the config values like follows:

'twitter' => [
        'consumerKey' => 'YOUR_CONSUMER_KEY',
        'consumerSecret' => 'YOUR_CONSUMER_SECRET',
        'accessToken' => 'YOUR_ACCESS_TOKEN',
        'accessTokenSecret' => 'YOUR_ACCESS_TOKEN_SECRET'
    ]

You can dynamically set those values or add new ones calling the method config like follows:

$social->config(['consumerKey' => 'new_key','accessToken' => 'new_access_token']);

Usage

$social = new SocialAutoPost;

By default it will use Twitter as Social Site but you can also pass the name as parameter:

$social = new SocialAutoPost('twitter');

Now you may use any method what you need. Please see the API List.

API List

Or go to Usage samples directly.

site

site method sets the social site, which you pass the name through parameter.

Syntax

params

params method sets the Post parameters, which you pass through parameter as array.

Syntax

Check out the Params Available.

post

post method sends the post. This method does not return the post response.

if you want to get the post response you can use withFeedback method chained to this method (post)

Syntax

withFeedback

withFeedback method provides the post response just after be sent the post.

Syntax

config

config method sets dynamically the social site app configuration, which you pass through parameter as array.

Syntax

getSite

getSite If you want to get the current social site in used, this method gets the social site name.

Syntax

getParams

getParams If you want to get the post parameters, this method may help you.

Syntax

getFeedback

getFeedback If you want to get the very last post feedback, this method may help you.

Syntax

getConfig

getConfig If you want to get the current social configuration, this method may help you.

Syntax

Usage samples

You can chain the methods.

$social = new SocialAutoPost('twitter');

$social->params(['status' => 'My new post #twitter])
        ->post()
        ->withFeedback();

or with media

$social = new SocialAutoPost('twitter');

    $social->params(['status' => 'My new post #twitter,
                    'media' =>'/path/myImage.jpg'
                    ])
            ->post()
            ->withFeedback();

NOTICE that Status cannot be over 140 characters for TWITTER.

or do it separately

$social = new SocialAutoPost('twitter');
$social->params(['status' => 'My new post #twitter])
$social->post();

Params Available

Twitter

Getting the Social Site response after posting

There are 2 way to get the post response:

1) Chain the method withFeedback() to the post() method.

2) You may call the method getFeedback() whenever you want after sending the post.

Laravel Alias Facade

After register the Alias Facade for this Package, you can use it like follows:

SocialAutoPost::site('twitter')
        ->params(['status' => 'My new post #twitter'])
        ->post()
        ->withFeedback();

It will return the post response.


All versions of social-auto-post with dependencies

PHP Build Version
Package Version
Requires php Version >=5.5.0
illuminate/support Version ^5.2
jublonet/codebird-php Version ^3.1
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package edujugon/social-auto-post contains the following files

Loading the files please wait ....