Answering my own question:
For a single Twitter post, it is not currently possible to remove borders based on specific parameters for a single Twitter post.
However, I've found two pieces of code that solve the problem, even though I still cannot explain them. The following code (based on this post) will enable parameters to be set for a single Twitter post (inside functions.php):
function my_oembed_fetch_url( $provider, $url, $args ) {
if ( strpos( $provider, 'twitter.com' ) !== false) {
// List of args for a single Tweet: https://dev.twitter.com/rest/reference/get/statuses/oembed
if ( isset( $args['lang'] ) ) {
$provider = add_query_arg( 'lang', $args['lang'], $provider );
}
if ( isset( $args['theme'] ) ) {
$provider = add_query_arg( 'theme', $args['theme'], $provider );
}
if ( isset( $args['align'] ) ) {
$provider = add_query_arg( 'align', $args['align'], $provider );
}
if ( isset( $args['hide_thread'] ) ) {
$provider = add_query_arg( 'hide_thread', $args['hide_thread'], $provider );
}
if ( isset( $args['widget_type'] ) ) {
$provider = add_query_arg( 'widget_type', $args['widget_type'], $provider );
}
}
return $provider;
}
add_filter('oembed_fetch_url', 'my_oembed_fetch_url', 10, 3 );
Inside template (for example index.php), set your desired parameters:
echo wp_oembed_get($twitterurl, array('theme'=>'light',widget_type'=>'video'));
An alternative code is to set parameters directly inside functions.php, using the following code (based on this post):
add_filter( 'oembed_fetch_url', function( $provider, $url, $args )
{
// Target publish.twitter.com provider
if( 'publish.twitter.com' === parse_url( $provider, PHP_URL_HOST ) )
$provider = add_query_arg( 'widget_type', 'video', $provider );
return $provider;
}, 99, 3 );
Inside template, simply use:
echo wp_oembed_get($twitterurl);