Skip to content

Commit

Permalink
updating Extension and ReadMe
Browse files Browse the repository at this point in the history
  • Loading branch information
janwebdev committed Mar 30, 2024
1 parent a583ecc commit bb65ab1
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 26 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Recommended way is through [Composer](https://getcomposer.org/download/)
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.
default_graph_version: "v15.0"
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".
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ public function load(array $configs, ContainerBuilder $container): void
$this->container->setParameter('social_post.configuration.publish_on', $this->configuration['publish_on']);

$this->setFacebookParameters();
$this->setLinkedInParameters();
$this->setTwitterParameters();

$this->loader->load('all_in_one.yml');
Expand Down Expand Up @@ -71,30 +70,6 @@ private function setFacebookParameters(): void
$this->loader->load('facebook.yml');
}

/**
* @throws InvalidConfigurationException
*/
private function setLinkedInParameters(): void
{
$configuration = $this->configuration;

if (!\in_array('linkedin', $configuration['publish_on'], true)) {
return;
}

if (!isset($configuration['providers']['linkedin'])) {
throw new InvalidConfigurationException('Found no configuration for the LinkedIn provider');
}

$linkedinConfiguration = $configuration['providers']['linkedin'];
$linkedinParameters = ['client_id', 'client_secret', 'access_token', 'company_page_id'];
foreach ($linkedinParameters as $parameter) {
$this->container->setParameter('social_post.configuration.linkedin.'.$parameter, $linkedinConfiguration[$parameter]);
}

$this->loader->load('linkedin.yml');
}

/**
* @throws InvalidConfigurationException
*/
Expand Down

0 comments on commit bb65ab1

Please sign in to comment.