motwreen/laravel-socialmedia

A laravel adapter for social media networks

dev-master 2018-01-31 17:22 UTC

This package is not auto-updated.

Last update: 2020-01-10 16:56:47 UTC


README

#laravel-socialmedia

Build Status MIT License

The first step will be to implement a post function for each Driver .

Install

composer require "motwreen/laravel-socialmedia":"@dev"

    'providers' = [
    ...
        Motwreen\Socialmedia\Providers\SocialmediaServiceProvider::class
    ],
    'aliases' = [
    ...
        'Socialmedia' => Motwreen\Socialmedia\Facades\Socialmedia::class
    ]

Usage

$config = [
    'app_id'        => 'FACEBOOK_APP_ID',
    'app_secret'    => 'FACEBOOK_APP_SECRET',
    'access_token'  => 'FACEBOOK_APP_ACCESS_TOKEN',
];

$post=['message'=>'Awesome POST Test message'];

Socialmedia::driver('facebook')->setConfig($config)->post($params);

Drivers

Facebook

Api Documentation

Obtain permanent Access Token: http://stackoverflow.com/a/28418469

Twitter

Api Documentation

Obtain permanent Access Token: https://dev.twitter.com/oauth/overview/application-owner-access-tokens

Pinterest

Api Documentation

How to get an access token:

Instagram

Hacky api endpoint

Google+

API Documentation