Skip to content
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
Cannot retrieve contributors at this time

Facebook Jobs Connector

Warning: The Facebook Jobs XML Feed is still experimental!

This Connector allows you to publish your Jobs on a xml output feed which will be parsed from the facebook company. To use this connector you need to provide fully configured Facebook App! Before you start be sure you've checked out the Setup Instructions.


First things first. To use this connector, you have to install the league/oauth2-facebook:

composer require league/oauth2-facebook:^2.0

Example Configuration

Each Connector needs some Items Resolver (Find the right object for the right context) and a single Item Transformer (Transform your object into a valid Facebook xml block in this case full feed specification).

    data_class: Job
        -   connector_name: facebook
            connector_item_transformer: App\Transformer\FacebookItemTransformer
                -   type: feed

Connector Configuration


Now head back to the backend (System => Jobs Configuration) and checkout the facebook tab.

  • Click on Install
  • Click on Enable
  • Before you hit the Connect button, you need to fill you out the Connector Configuration. After that, click "Save".
  • Click Connect



This will guide you through the facebook token generation. After hitting the "Connect" button, a new window will open. After a access token has been successfully generated, you can close the window. Click on "Check & Apply Connection" to finalize the connection state.

Feed Generator

This Connector requires a fully registered feed. Click on "Add Feed" and start the generation process. First, it will generate a Recruiting Manager Id which is required by facebook. If this step was successful, a second call will generate the feed itself. If this was successful too, your connector is fully configured and ready to use.

Item Transformer

In our example we have a service class called App\Transformer\FacebookItemTransformer. Every Item Transformer has its own logic as you can see here:


namespace App\Transformer;

use JobsBundle\Context\ResolvedItemInterface;
use JobsBundle\Transformer\ItemTransformerDefinitionInterface;
use JobsBundle\Transformer\ItemTransformerInterface;
use Pimcore\Model\DataObject\MyJobClass;

class FacebookItemTransformer implements ItemTransformerInterface
    public function transform(ResolvedItemInterface $item, ItemTransformerDefinitionInterface $itemTransformerDefinition): void
        /** @var MyJobClass $subject */
        $subject = $item->getSubject();

        $contextDefinition = $item->getContextItem()->getContextDefinition();
        $locale = $contextDefinition->getLocale();


Item Resolver

There is only a simple items resolver required since the facebook connector will output its data via a data feed.


You're done. Go to your job object and enable all required context definitions.