WordPress.org

Ready to get started?Download WordPress

Plugin Directory

!This plugin hasn't been updated in over 2 years. It may no longer be maintained or supported and may have compatibility issues when used with more recent versions of WordPress.

WP Tweet Button

The WordPress implementation of the official Twitter Tweet Button.

How come the tweet count doesn't change right away?

Twitter uses a caching system that periodically updates the tweet counts. Your browser also caches the iframe containing the count. Both these caches need to expire before any changes are made apparent.

How do I add the post title or blog title in custom tweet texts?

You can use the %POSTTITLE% and %BLOGTITLE% tags to do this. These tags are valid in the WP Tweet Button general configuration and in your posts' Tweet Button settings.

Example:

  • New blog entry: %POSTTITLE% #cats

"#cats" in this example is a tag that's relevant to your blog.

  • New blog entry: %POSTTITLE% - %BLOGHASHTAGS%

In this example %BLOGHASHTAGS% will be replaced with #hash tags generated using your blog entry's tags. You can also use %BLOGHASHCATS% to generate #hash tags using the entry's categories.

How do I create custom recommendations for each separate post/page?

Simply edit your post and set your recommended user in the Tweet Button options box.

How do manually create the Tweet Button in my template code?

To create the Tweet Button manually, call the tweetbutton(); function.

Examples:

  • echo tweetbutton();
  • $myCustomPlaceForSocialMedia .= tweetbutton();

Examples:

  • echo tweetbutton($post);
  • $myCustomPlaceForSocialMedia .= tweetbutton($post);

Parameters

The tweetbutton function currently includes 3 optional parameters: $thepost, $bwdata and $type.

tweetbutton([object $thepost][,boolean $bwdata][,string $type]);

  • $thepost - Defaults to $post and is the post object.
  • $bwdata - Defaults to false. Set this option to true if you want to generate the button using HTML5 data attributes.
  • $type - Defaults to the setting set in the options page. Set this parameter to 'vertical', 'horizontal' or 'none' to change the type of button.

You can skip parameters by setting them to null (Resulting in default values). Example:

echo tweetbutton(null,null,'horizontal');

How does auto-tweeting work?

Auto-tweeting using the WP Tweet Button is performed by service running on a centralized server. This is done not only to avoid the need to register an application for each blog, but also to ensure your tweets are formatted correctly in different languages.

When auto-tweeting, the plugin collects the information it needs for the tweet and sends it to the tweet server encoded in Base64. The encoding is done to avoid formatting issues. Auto-tweet are performed once per new or saved post depending on your configuration. Auto-tweeting is also performed for scheduled blog entries.

Plugin doesn't work for some reason. How I contact the author?

You can either leave a comment on the plugin's page, or contact the author on twitter (@TCorp).

Requires: 3.0 or higher
Compatible up to: 3.1.4
Last Updated: 2011-5-7
Downloads: 160,289

Ratings

3 stars
3.7 out of 5 stars

Support

Got something to say? Need help?

Compatibility

+
=
Not enough data

0 people say it works.
0 people say it's broken.

100,2,2 100,1,1 100,1,1 100,1,1 100,2,2 100,1,1 100,2,2 100,1,1 100,1,1 100,2,2 100,2,2 100,3,3 100,1,1 100,1,1 100,1,1 100,1,1 100,1,1 100,1,1 100,4,4 50,2,1 100,3,3 100,1,1 100,3,3 50,2,1 100,1,1 80,5,4 100,1,1
100,1,1
100,2,2
100,1,1 100,1,1 100,1,1 100,1,1 100,3,3 50,2,1 50,2,1
100,1,1
100,3,3
100,1,1
67,3,2 100,2,2
0,2,0 100,1,1
50,2,1
100,1,1
100,1,1
100,2,2
67,3,2