Tag Info

Hot answers tagged

11

I wrote a shortcode function based on "Twitter Hash Tag Widget" plugin just copy this function to your themes functions.php file function tweets_by_hashtag_9867($atts, $content = null){ extract(shortcode_atts(array( "hashtag" => 'default_tag', "number" => 5, ), $atts)); $api_url = ...


11

This is a little tricky because sanitize_user allows spaces in usernames, meaning it difficult to avoid grabbing the whole phrase '@johndoe said that ... ' as opposed to just the actual username '@johndoe' and you have no separator at the end that would help. To avoid that I imposed a requirement that spaces in the username be replaced with '+'. function ...


7

You need to do this in steps: Decide when you are going to parse the user's meta to change the value. Define a function to do that. Hook that function to the appropriate action. The original answer defined what you need to do for step #2, using preg_match() to parse the Twitter URL and extract the username. function update_the_user( $user ) { // ...


5

Otto has some great plugins for facebook and twitter. The one is Simple Facebook Connect (Wordpress Plugin) the other is Simple Twitter Connect (Wordpress Plugin). I think you're looking for this functionality: Automatically Publish new posts to Facebook Profile or Fan Page and for Twitter: Auto-tweet new posts to an account. Both are offered by the ...


4

Functions can only return one value. Change all the echo statements in your tweet function to concatenate a string, then return the string at the end of the function.


4

This is a bit of a multi-part question, so you're getting a multi-part answer. Getting the Facebook count can be done by making a request to https://graph.facebook.com/URL. This will return a json object which contains, among other things, the number of "shares". Working example which has 4 shares as of this writing: ...


4

I use disqus on my site and it works quite well.


4

I've managed to find a solution to my problem. I solved it with three plugins Members User Role Editor Social Login The combination of these plugins allows you to who can log in, without telling them how to log in. More specifically, anyone will be able to log in with a social network, but they won't be able to see everything. With User Role Editor, you ...


4

As the author of Twitter Tools, I can confirm it is alive and well. Twitter Tools 3.0 beta 2 was released earlier this year: http://alexking.org/blog/2012/01/22/twitter-tools-3-0-beta-2 Now that Social 2.5 is out, a final release of Twitter Tools 3.0 will be available once we have some time to finish testing. You can always grab the latest version from ...


3

Both Simple Facebook Connect and Simple Twitter Connect have features to allow users to post comments using their Facebook or Twitter credentials. Among other things. Disclaimer: I wrote 'em both.


3

Hi @Nam Gi VU: In general, this is not really a WordPress question. I'll answer it because I tend to be lenient about how related questions need to be but there's a good change another moderator will close the question and if they do I'll agree. Basically since WordPress.com does not provide this feature you need to use a 3rd party service that will read ...


3

I have done that before by using the Gigya Socialize plugin check it out http://wordpress.org/extend/plugins/gigya-socialize-for-wordpress/


3

STC does not have a signup/register function, because Twitter doesn't provide any API to get an email for the user. So the signup process has no way to email the user with valid information like password and such. If you have a better way/workflow/design/idea to do it, then I'd be happy to add it to Simple Twitter Connect.


3

I use Otto's Simple Twitter Connect. It's pretty amazing, and doesn't require too much configuration.


3

Look at the P2 theme. It does this, calling them "Mentions". http://themes.svn.wordpress.org/p2/1.4.2/inc/mentions.php


2

The mark-up surrounding the widget is malformed. IE isn't handling this as well as other browsers. <h1>Twitter</h1><h2><a href="http://twitter.com">Follow</h2> <div><h2><span class='twitterwidget twitterwidget-title'> Note the opening anchor tag before "Follow". This is never closed.


2

There is an extra action hook for scheduled posts: publish_future_post - it isn't very good documented though. There are occurrences of the hook in: /wp-includes/default-filters.php /wp-admin/includes/upgrade.php /wp-includes/post.php The hook invokes check_and_publish_future_post(). Read the linked information, if you want to inform yourself further. ...


2

I've used add_action ('transition_post_status', 'my_action'); and it works great for both posts that are published directly or in the future. The function my_action being: function my_action ($new_status, $old_status, $post) { if (($old_status != 'publish') && ($new_status == 'publish')) { // doing things. } }


2

WordPress has a core function human_time_diff that does what you want, using it with the filter you provide you have someting like so: add_filter('latest_tweets_render_date', function( $created_at ){ $date = DateTime::createFromFormat('D M d H:i:s O Y', $created_at ); return sprintf( '%s ' . __( 'ago' ), human_time_diff( $date->format('U') ) ); ...


2

Don't know if this will give you everything you're looking for, but I like Twitter Tools by Alex King.


2

In the insert_posts function, before the line $post_id = wp_insert_post( $post ); add the following (and suit to your needs): Link to Twitter User Page $post['post_content'] .= '<a href="http://twitter.com/__USERNAME__">' .'Follow me on Twitter' .'</a>'; and/or Link to Twitter Status $post['post_content'] .= '<a ...


2

Depending on the particular Twitter plugin you're using, you could filter based on the presence of a particular hash tag. Twitter Tracker appears to have the ability to do this when the search is of the form #hashtag from:username.


2

Have you tried Simple Twitter Connect and Simple Facebook Connect.


2

Looks like you've mis-named the function. It is the_tweetbutton(), rather than tweetbutton(). Also, you should always wrap Plugin-added function calls in if (function_exists()) conditional wrappers. Putting that together, this: <div id="tweet-button"> <?php tweetbutton(); ?> </div> Becomes this: <div id="tweet-button"> ...


2

I finally, got it; <?php echo tweetbutton(); ?>


2

There are 2 ways to do this. The first is to create a function that outputs the buttons and then include it in your template. The second is to add a filter to either the_content or the_excerpt or both depending on where you want the buttons to show up. In either case the first thing you need to do is separate out the script calls from the code that ...


2

Hi Rob@:try with this plugin Tweet This.you can set your custom image also.:) or Try this code... Open the sidebar.php Locate the “twitter-feed” div <div class=”twitter-feed”> <h2>What I’m up to…</h2> <ul id=”twitter_update_list”></ul> <script type=”text/javascript” ...


2

That is one nasty regexp. I would suggest looking into Twitter entities instead, much easier than trying to parse it yourself. And this really has little to do with WP and more suitable for other sites in network.


2

Two issues: The code you're using requires Administrator-role capabilities The code you're using requires fopen() wrappers, which may be disabled by your host You should probably be using wp_remote_get() instead of file_get_contents(). I would also recommend caching the result, rather than storing it as a DB option. But, let's start with the basics. I'm ...


2

Ouch, that snippet is ancient (I am kinda its author, more precisely adapted to twitter from other snippet). I would strongly consider using some newer solution. I had later made newer and written from scratch version, try it http://www.rarst.net/script/twitter-counts-wordpress/



Only top voted, non community-wiki answers of a minimum length are eligible