Download the PHP package draliragab/socialize without Composer

On this page you can find all versions of the php package draliragab/socialize. 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 socialize

Socialize your Laravel project easily

Latest Version on Packagist License

Socialize is a package that helps you to add social media features to your Laravel project easily.

You can share posts to Facebook, Twitter, Instagram and more is coming soon.

Or you can share posts using model trait.

Table of Contents

Installation

You can install the package via composer:

You can publish the config file with:

This is the contents of the published config file:

Configuration

For each social media you need to add the required credentials to your .env file or directly to the published config file.

By default, the package will use the default configuration. But you can publish to multiple pages and accounts by adding more configurations.

and pass the configuration name to the initialization method.

Usage

All the social media providers have share and getPostId methods.

Facebook

Initialization

Accepts the configuration name as a parameter.

Available Methods to set Options for sharePost() method

Example:

uploadPhoto(), deletePhoto(), uploadVideo(), deleteVideo()

Upload a photo to a Page.

Or you can publish photos directly to a Page.

getPosts()

get the posts of a Facebook Page. Returns Collection.

Accepts two parameters:

getTaggedPosts()

get all public posts in which the page has been tagged.

getPost()

get a specific post by its id. Returns Collection.

accepts two parameters:

deletePost()

Delete a post by its id. Returns true if the post is deleted successfully.

getComments()

get comments of a post. Returns Collection.

accepts three parameters:

getUrl()

get the url of a post.

Twitter

Initialization

Accepts the configuration name as a parameter.

tweet()

Publish a tweet to a Twitter account.

available methods to set options for a tweet

Example:

addComment()

Add a comment to a tweet.

uploadMedia(), getMediaIds()

Upload media to the account

accepts an array of media paths.

addMedia()

Add media to a tweet.

accepts an array of media ids.

You can combine uploadMedia() and addMedia().

deleteTweet()

Delete a tweet by its id. Returns true if the tweet is deleted successfully.

Instagram

Initialization

Accepts the configuration name as a parameter.

publishImage()

Publish an image to an Instagram account.

accepts three parameters:

publishImageCarousel()

Publish an image carousel to an Instagram account.

accepts three parameters:

addComment()

Add a comment to a post.

getUrl()

get the url of a post.

getPost()

get a specific post by its id. Returns Collection.

accepts two parameters:

Traits

Socializer

This trait is used to share to social media directly from the model.

shareToFacebook(), shareToTwitter(), shareToInstagram()

Share to social media directly from the model.

All of the above methods search for the image in the image column of the model and the message in the title column.

You can change the columns in the config file.

Or you can pass the message, image and sharing options as array.

Also you can pass the social media account.

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

Credits

License

The MIT License (MIT). Please see License File for more information.


All versions of socialize with dependencies

PHP Build Version
Package Version
Requires php Version ^8.0
abraham/twitteroauth Version ^6.0
spatie/laravel-package-tools Version ^1.16
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 draliragab/socialize contains the following files

Loading the files please wait ....