Skip to content

POST/me/publicize-connections/$publicize_connection_ID

Update a single publicize connection belonging to the current user.

Resource Information

   
Method POST
URL https://public-api.wordpress.com/rest/v1.1/me/publicize-connections/$publicize_connection_ID
Requires authentication? Yes

Method Parameters

Query Parameters

Request Parameters

Response Parameters

Resource Errors

This endpoint does not return any errors.

Example

curl \
 -H 'authorization: Bearer YOUR_API_TOKEN' \
 --data-urlencode 'external_user_id=1234' \
 --data-urlencode 'shared=1' \
 'https://public-api.wordpress.com/rest/v1.1/me/publicize-connections/1234'
<?php
$options  = array (
  'http' => 
  array (
    'ignore_errors' => true,
    'method' => 'POST',
    'header' => 
    array (
      0 => 'authorization: Bearer YOUR_API_TOKEN',
      1 => 'Content-Type: application/x-www-form-urlencoded',
    ),
    'content' => 
     http_build_query(  array (
        'external_user_id' => 1234,
        'shared' => true,
      )),
  ),
);

$context  = stream_context_create( $options );
$response = file_get_contents(
	'https://public-api.wordpress.com/rest/v1.1/me/publicize-connections/1234',
	false,
	$context
);
$response = json_decode( $response );
?>