ddkits/ddkitsfacebook

Facebook Page Poster by Sam Elayyoub, using custom table and custom functions to post to pages or groups on facebook.

2.1 2021-10-03 06:33 UTC

This package is not auto-updated.

Last update: 2024-04-30 02:57:22 UTC


README

By Sam Elayyoub

1: Install Laravel 5.x

2: Composer require ddkits/ddkitsfacebook

3: Add DDkits within the service provider

- ...
'providers' => [
    /*
     * Application Service Providers...
     */
     ...
    Ddkits\Ddkitsfacebook\DdkitsfacebookServiceProvider::class,
],

4: In case of changing the theme

- php artisan vendor:publish --tag="Ddkits\Ddkitsfacebook\DdkitsfacebookServiceProvider"

5: Migrate the DB table needed for this Plugin

- php artisan migrate

6: Check the configs

- ddkitsfacebook.php got some extra configs for major uses
- Path: when calling the function "publishToPageNew($feed, $id)" posts on facebook would be linked to a path located in your site

requirements:

- Facebook app and Access_token https://developers.facebook.com/tools/explorer/

- Posts/blogs or feeds fields
    - title
    - path (slug of your site if using ID please create the slug field and copy the id into it)
    - image (your post image)

Usage: ../admin-ddkits-facebook (must be a logged in user, using Auth::id())

- ...
use Ddkits\Ddkitsfacebook;

...
$feed ==> is the page or node you are posting link to facebook

Ddkitsfacebook::publishToPageNew($feed, $id);

- Can be used as schedule cron too.

Done!!!