Hot answers tagged

13

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 ...


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 = '...


8

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 ) { // ...


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: https://graph.facebook.com/http://...


4

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


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

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 ...


4

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


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 have done that before by using the Gigya Socialize plugin check it out http://wordpress.org/extend/plugins/gigya-socialize-for-wordpress/


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 use Otto's Simple Twitter Connect. It's pretty amazing, and doesn't require too much configuration.


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

I reworked (added another version of) my function to remove the if statement to check post status, as the post is scheduled to publish it turns out i don't need to check it again. /* the function */ function tcr_tweet2($postID) { /* get the post that's being published */ $post = get_post($postID); $post_title = $post-&...


2

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


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

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


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

The easiest way of doing this is to use a slightly undocumented feature of twitter's search - you can pull an Atom feed for any search query (which includes hashtags), and then use FeedWordPress to generate posts. A sample Twitter search query that returns Atom (which is is an alternative to RSS and works in the same way): https://search.twitter.com/search....


2

Have you tried Simple Twitter Connect and Simple Facebook Connect.


2

There's Tweet Blender, seems pretty flexible and full of options: Provides several Twitter widgets: show your own tweets, show tweets relevant to post's tags, show tweets for Twitter lists, show tweets for hashtags Twitter Hash Tag Widget: A widget for displaying the most recent twitter status updates for a particular hash tag. Twitter ...


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” src=”http://twitter.com/javascripts/blogger.js”></...


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/


2

WordPress doesn't have "tweeting" functionality built in. However, post scheduling is built in. You just set the time when you want the post to publish on the edit post screen. If you use a twitter plugin like my own Simple Twitter Connect, and you schedule a post, then it will send the tweet at the same time as the post is published. STC requires some ...


2

In your dashboard, go to Settings > Sharing, and drag the available social networks into the "Enabled Services" area to accomplish this. See http://en.blog.wordpress.com/2010/08/24/more-ways-to-share/.


2

Disqus is a popular cross-site comment system which allows logging in via various methods, including Twitter, Facebook and your own disqus account. They obviously have their own Wordpress plugin you should check out.


2

This might help you out if you haven't found an answer yet. /* BEGIN Custom User Contact Info */ function extra_contact_info($contactmethods) { unset($contactmethods['aim']); unset($contactmethods['yim']); unset($contactmethods['jabber']); $contactmethods['facebook'] = 'Facebook'; $contactmethods['twitter'] = 'Twitter'; $...



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