PHPackages                             edujugon/social-auto-post - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. edujugon/social-auto-post

ActiveLibrary[API Development](/categories/api)

edujugon/social-auto-post
=========================

PHP and Laravel 5 Package to post on Twitter

v1.0(9y ago)135.9k5MITPHPPHP &gt;=5.5.0

Since Jul 29Pushed 9y ago2 watchersCompare

[ Source](https://github.com/Edujugon/SocialAutoPost)[ Packagist](https://packagist.org/packages/edujugon/social-auto-post)[ RSS](/packages/edujugon-social-auto-post/feed)WikiDiscussions master Synced 4w ago

READMEChangelog (1)Dependencies (3)Versions (2)Used By (0)

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:

- Twitter
- More sites coming soon.

Installation
------------

[](#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.\*
------------

[](#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](https://github.com/edujugon/SocialAutoPost#laravel-alias-facade) directly.

Configuration
-------------

[](#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
-----

[](#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
--------

[](#api-list)

- [site](https://github.com/edujugon/SocialAutoPost#site)
- [params](https://github.com/edujugon/SocialAutoPost#params)
- [post](https://github.com/edujugon/SocialAutoPost#post)
- [withFeedback](https://github.com/edujugon/SocialAutoPost#withfeedback)
- [config](https://github.com/edujugon/SocialAutoPost#config)
- [getSite](https://github.com/edujugon/SocialAutoPost#getsite)
- [getParams](https://github.com/edujugon/SocialAutoPost#getparams)
- [getFeedback](https://github.com/edujugon/SocialAutoPost#getfeedback)
- [getConfig](https://github.com/edujugon/SocialAutoPost#getconfig)

> Or go to [Usage samples](https://github.com/edujugon/SocialAutoPost#usage-samples) directly.

#### site

[](#site)

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

**Syntax**

```
object site($socialName)
```

#### params

[](#params)

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

**Syntax**

```
object params(array $data)
```

Check out the [Params Available](https://github.com/edujugon/SocialAutoPost#params-available).

#### post

[](#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](https://github.com/edujugon/SocialAutoPost#withfeedback) method chained to this method (post)

**Syntax**

```
object post()
```

#### withFeedback

[](#withfeedback)

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

**Syntax**

```
object/array withFeedback()
```

#### config

[](#config)

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

**Syntax**

```
object config(array $data)
```

#### getSite

[](#getsite)

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

**Syntax**

```
string getSite()
```

#### getParams

[](#getparams)

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

**Syntax**

```
array getParams()
```

#### getFeedback

[](#getfeedback)

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

**Syntax**

```
object/null getFeedback()
```

#### getConfig

[](#getconfig)

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

**Syntax**

```
array getConfig()
```

Usage samples
-------------

[](#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

[](#params-available)

#### Twitter

[](#twitter)

- status
- media (optional)
    - local path to your image.
    - url to you image.

#### Getting the Social Site response after posting

[](#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.

    ```
    $social = new SocialAutoPost('twitter');

    $social->params(['status' => 'My new post #twitter])
        ->post()
        ->withFeedback();
    ```
2. You may call the method `getFeedback()` whenever you want after sending the post.

    ```
    $social->getFeedback();
    ```

### Laravel Alias Facade

[](#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.

###  Health Score

32

—

LowBetter than 69% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity27

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

3623d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/4853751?v=4)[Eduardo Marcos](/maintainers/edujugon)[@Edujugon](https://github.com/Edujugon)

---

Top Contributors

[![Edujugon](https://avatars.githubusercontent.com/u/4853751?v=4)](https://github.com/Edujugon "Edujugon (8 commits)")

---

Tags

laraveltwittersocialposttweetauto-post

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/edujugon-social-auto-post/health.svg)

```
[![Health](https://phpackages.com/badges/edujugon-social-auto-post/health.svg)](https://phpackages.com/packages/edujugon-social-auto-post)
```

###  Alternatives

[defstudio/telegraph

A laravel facade to interact with Telegram Bots

815320.5k3](/packages/defstudio-telegraph)[riclep/laravel-storyblok

A Laravel wrapper around the Storyblok API to provide a familiar experience for Laravel devs

6277.0k5](/packages/riclep-laravel-storyblok)[simplestats-io/laravel-client

Analytics for Laravel. Track visitors, registrations, and payments. Discover which channels actually drive revenue, not just traffic. Server-side, GDPR compliant, ad-blocker proof.

5019.3k](/packages/simplestats-io-laravel-client)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
