I have a client who would very much like to choose which WordPress posts they publish to be sent to their facebook and Twitter accounts with a click of a button or checkbox. You’d think woth the onlaught and frenzy of Tweeting and spuerpoking, their would be a buffet of WordPress plugins to post blogs to facebook and Twitter to choose from. And there are, and none of them seem to work right. The closest I got to getting a plugin to do what I needed was using the “supr by StumbleUpon” plugin which allows you to post a a blog post to both facebook and Twitter. It works for facebook, though a bit buggy. But the Twitter function doesn’t work at all. I found this all quite frustrating so I created a quick work around without having to create my own bloody plugin!
Most facebook and Twitter WordPress plugins are about allowing your users to add a post their reading and like to their facebook or Twitter accounts. This is usually in the form of a link at the end of the post on the single post page. I thought, well, why can’t the client do the same and only have this link appear when he’s logged in. Using Tweet This, a plugin that adds a link to both Twitter, facebook and other social networking sites like myspace to the end of a post for sharing, I added the link on the client can see when he’s logged in. I placed the following code right after the the_content(); function:
global $user_ID; if( $user_ID ) :
if( current_user_can('level_10') ) :
tweet_this('twitter');
tweet_this('facebook');
else :
endif;
endif;
“level_10” represents the administrator role in WordPress. The tweet_this(); functions each represent the social networking links I chose to use for this particular site. Again, there are about a handful of other social networking services you can use like myspace and delicious. The code is basically saying that if the user who is logged in has level 10 clearance (sounds covert doesn’t it!), than he or she can see these links. The result is the following links at the end of the post content on the single post page:
![]()
It’s not the simplest solution but it is the best that I can find save for seriously editing current plugins, or creating one myself. Hell, maybe there is one out there that does in fact work for Twitter and facebook that I simply glossed over. If there is, I’d be happy to here about it….


2 responses so far ↓
1 Posts about plugins as of August 9, 2009 | All About WordPress // Aug 9, 2009 at 8:04 am
[...] about plugins as of August 9, 2009 Sunday, August 9th, 2009 Social Networking Your Blog – Facebook and Twitter WordPress Plugins – wordpresspad.com 08/09/2009 I have a client who would very much like to choose which [...]
2 Social Networking Your Blog – Facebook and Twitter WordPress … // Aug 9, 2009 at 1:12 pm
[...] original post here: Social Networking Your Blog – Facebook and Twitter WordPress … SHARETHIS.addEntry({ title: "Social Networking Your Blog – Facebook and Twitter WordPress [...]
Leave a Comment