2017 © Pedro Peláez
 

symfony-bundle social-post-bundle

Symfony bundle for simultaneous posting of the same message to Facebook, LinkedIn and Twitter

image

martin-georgiev/social-post-bundle

Symfony bundle for simultaneous posting of the same message to Facebook, LinkedIn and Twitter

  • Monday, March 19, 2018
  • by martin-georgiev
  • Repository
  • 3 Watchers
  • 21 Stars
  • 775 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 6 Forks
  • 0 Open issues
  • 5 Versions
  • 14 % Grown

The README.md

Scrutinizer Code Quality Build Status Coverage Status Latest Stable Version, (*1)

Total Downloads

Upgrading?

Check the upgrade guide., (*2)


What's this?

This is a Symfony bundle written in PHP 7.1 that wraps martin-georgiev/social-post - an easy way for simultaneous publishing to multiple social networks. Currently, it integrates with Facebook, LinkedIn and Twitter., (*3)


How to install it?

Recommended way is through Composer, (*4)

composer require martin-georgiev/social-post-bundle

Integration with Symfony

Add social networks configuration, (*5)

# Usually part of config.yml
social_post:
    publish_on: [facebook, linkedin, twitter]         # List which Social networks you will be publishing to and configure your access to them as shown below
    providers:
        facebook:
            app_id: "YOUR-FACEBOOK-APP-ID"
            app_secret: "YOUR-FACEBOOK-APP-SECRET"
            default_access_token: "YOUR-FACEBOOK-NON-EXPIRING-PAGE-ACCESS-TOKEN"
            page_id: "YOUR-FACEBOOK-PAGE-ID"
            enable_beta_mode: true
            default_graph_version: "v2.8"             # Optional, also supports "mcrypt" and "urandom". Default uses the latest graph version.
            persistent_data_handler: "memory"         # Optional, also supports "session". Default is "memory".
            pseudo_random_string_generator: "openssl" # Optional, also supports "mcrypt" and "urandom". Default is "openssl".
            http_client_handler: "curl"               # Optional, also supports "stream" and "guzzle". Default is "curl".
        linkedin:
            client_id: "YOUR-LINKEDIN-APP-CLIENT-ID"
            client_secret: "YOUR-LINKEDIN-APP-CLIENT-SECRET"
            access_token: "YOUR-LINKEDIN-60-DAYS-LONG-USER-ACCESS-TOKEN"
            company_page_id: "YOUR-LINKEDIN-COMPANY-PAGE-ID"
        twitter:
            consumer_key: "YOUR-TWITTER-APP-CONSUMER-KEY"
            consumer_secret: "YOUR-TWITTER-APP-CONSUMER-SECRET"
            access_token: "YOUR-TWITTER-ACCESS-TOKEN"
            access_token_secret: "YOUR-TWITTER-ACCESS-TOKEN-SECRET"

Register the bundle, (*6)

# Usually your app/AppKernel.php
<?php
// ...
class AppKernel extends Kernel
{
    public function registerBundles()
    {
        $bundles = [
            // ...
            new \MartinGeorgiev\SocialPostBundle\SocialPostBundle(),
        ];
        return $bundles;
    }
    // ...
}

Post a test message, (*7)

# Some Symfony container aware class
<?php
//...
$message = new \MartinGeorgiev\SocialPost\Message('your test message');
$container->get('social_post')->publish($message);

Additional help

Twitter has limited features for tweet customisation. This means that for tweets only message and link values (MartinGeorgiev\SocialPost\Message instance) will be used., (*8)

Facebook doesn't support non-expiring user access tokens. Instead, you can obtain a permanent page access token. When using such tokens you can act and post as the page itself. More information about the page access tokens from the official Facebook documentation. Some Stackoverflow answers (here and here) also can of help., (*9)


License

This package is licensed under the MIT License., (*10)

The Versions

19/03 2018

dev-develop

dev-develop

Symfony bundle for simultaneous posting of the same message to Facebook, LinkedIn and Twitter

  Sources   Download

MIT

The Requires

 

The Development Requires

by Martin Georgiev

bundle symfony3 facebook php7 twitter linkedin social network twitteroauth martin georgiev facabook sdk for php post update symfony4

23/11 2017

dev-master

9999999-dev

Symfony bundle for simultaneous posting of the same message to Facebook, LinkedIn and Twitter

  Sources   Download

MIT

The Requires

 

The Development Requires

by Martin Georgiev

bundle symfony3 facebook php7 twitter linkedin social network twitteroauth martin georgiev facabook sdk for php post update symfony4

23/11 2017

2.0.1

2.0.1.0

Symfony bundle for simultaneous posting of the same message to Facebook, LinkedIn and Twitter

  Sources   Download

MIT

The Requires

 

The Development Requires

by Martin Georgiev

bundle symfony3 facebook php7 twitter linkedin social network twitteroauth martin georgiev facabook sdk for php post update symfony4

06/05 2017

v2.0.0

2.0.0.0

Symfony 3 bundle for simultaneous posting of the same message to Facebook, LinkedIn and Twitter

  Sources   Download

MIT

The Requires

 

The Development Requires

by Martin Georgiev

bundle symfony3 facebook php7 twitter linkedin social network twitteroauth martin georgiev facabook sdk for php post update

17/03 2017

1.0.0

1.0.0.0

Symfony 3 bundle for simultaneous posting of status update to Facebook (acting as a page) and Twitter

  Sources   Download

MIT

The Requires

 

The Development Requires

by Martin Georgiev

bundle symfony3 facebook twitter social network twitteroauth martin georgiev facabook sdk for php post update