Overview #
Twitter can be integrated in multiple ways with your WordPress.com VIP site.
- Pushing out content updates.
- Integrating Twitter updates in your site’s theme.
- Providing your users a quick way to Tweet/share your site’s content.
WordPress.com Publicize #
In addition to sending your content updates to Facebook and Yahoo!, the WordPress.com Publicize feature also supports Twitter updates. A full description of the feature can be found at the Publicize WordPress.com Support page.
WordPress.com VIPs can further customize how Publicize works by following our customization guide.
The Twitter Widget #
The Twitter widget allows you to display updates from a Twitter account in the sidebar of your blog. It creates an unordered list whose look and feel can be easily altered using CSS.
A full description of this widget can be found at the Twitter Widget WordPress.com Support page.
/via #
If you’re using the built-in WordPress.com Sharing buttons, we have a helper function to customize the “/via” tag appended to Tweets. Just add the following to your functions.php and change the argument to the username you want attributed.
wpcom_vip_sharing_twitter_via( 'automattic' );
If you want to disable the “/via”, just pass in false
wpcom_vip_sharing_twitter_via( false );
Twitter Cards #
To automatically add Twitter Card support for your site, just use our Open Graph Tags. We’ll add some additional metadata including some user-specific info if you’re using Publicize.
You can customize the output of the tags using the jetpack_open_graph_tags filter:
function my_add_twitter_card_extras( $tags ) {
$tags[ 'twitter:site' ] = 'automattic'; // set @username of website
return $tags;
}
add_filter( 'jetpack_open_graph_tags', 'my_add_twitter_card_extras' );
The Twitter API #
Using a Twitter client that supports custom APIs, you can connect to WordPress.com to follow your favorite blogs and receive notifications when new posts are published. You can even publish status updates to the WordPress.com blog of your choice.
More information about using the Twitter API can be found at the Twitter API WordPress.com Support page.