Support » Plugin: myCRED » myCred for Sharing Post into facebook,twitter,google plus?

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author Gabriel



    Right now there is no third-party plugin that supports awarding points for sharing of posts. But there is a tutorial on the myCRED website where you can award points when a user clicks on “Share on Facebook” etc. via a custom shortcode.

    The problem is that unless you use a social media app that tells your website that someone has successfully shared a post, there is no notifications from i.e. Facebook letting us know that a user has shared a post.

    You can find a complete list of plugins that myCRED supports on the myCRED Supported Plugins page.

    idk if this is available too..
    I need to make a button, that will cost x mycred points
    once it’s clicked it will show download links..
    is it available?
    thanks 🙂

    I went to plugins, mycred – edit:
    I added the code:

    add_shortcode( 'mycred_share_this', 'mycred_render_shortcode_share_this' );
    function mycred_render_shortcode_share_this( $attr, $link_title )
    	// Get URL (we assume you only use this shortcode inside the loop)
    	$url = get_permalink();
    	// Append social media share urls
    	if ( $attr['href'] == 'facebook' )
    		$attr['href'] = '' . urlencode( $url );
    	elseif ( $attr['href'] == 'twitter' )
    		$attr['href'] = '' . urlencode( $url );
    	elseif ( $attr['href'] == 'google' )
    		$attr['href'] = '' . urlencode( $url );
    	elseif ( $attr['href'] == 'pinterest' )
    		$attr['href'] = '' . urlencode( $url );
    	// Always make links open in a new window
    	$attr['target'] = '_blank';
    	// Pass it on
    	return mycred_render_shortcode_link( $attr, $link_title );

    before the comments at the end of the script,
    then added the shortcode into one of my posts:
    I get the error error Anchor missing URL!

    Plugin Author Gabriel


    Have you had a look at the Sell Content add-on in myCRED?

    You can select to sell entire post contents or parts of it. You could wrap your download links with the mycred_sell_this shortcode which will force users to pay to see the download links. Everything else in your post content outside this shortcode will be visible.

    Plugin Author Gabriel


    Why are you putting this code in the myCRED plugin? You will loose this the next time you update myCRED! As explained in the tutorial, the code goes in your themes functions.php file.

    As the error message suggests, you must enter which site you want to share with. You do this via the href attribute.

    You can find more information if you have a read though the tutorial.

    I added the script into my theme’s functions.php

    also, the shortcode didn’t work:


    Plugin Author Gabriel


    I answered your new post.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘myCred for Sharing Post into facebook,twitter,google plus?’ is closed to new replies.