For my use case, I needed to add certain Facebook permissions for the user to grant access to, and also wished to specify the URL to redirect to after successful authorisation.
I've added the ability to use query parameters in the `social_post_facebook.redirect_to_facebook`, for example:
$query = [
// Add params to the Facebook API call
'api_params' => [
'permissions' => [
'publish_actions',
'public_profile',
'email'
]
],
// Specify a different callback route if you want to eg. add extra actions on saving a social account
'callback_route' => 'my_module.callback',
// Specify a different redirect route if you want to redirect somewhere other than /user after authorisation is finished
'redirect_route' => 'entity.node.canonical',
// You can specify params for the redirect route - these get added as ROUTE parameters (not query)
'redirect_params' => [
'node' => 1 // redirect to node/1
],
];
// If eg. redirecting via a form
$form_state->setRedirect('social_post_facebook.redirect_to_facebook', [], ['query' => $query]);
Closed: outdated
1.0
Code
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.