BuddyDev

Search

I need a way to share single images from a gallery to facebook?

  • Keymaster
    Level: Yogi
    (BuddyDev Team)
    Posts: 3115
    Ravi on #24971

    Hello Audiomonk,

    Thank you for the information. I have checked with above mentioned SEO framework and find that our cannonical link formation is same as single media page. You can the following url for refrenece.

    http://demos.buddydev.com/t1/members/admin/mediapress/fisrt-photo-gallery/171005_16_17_28_5dsr1733-0/

    Regards
    Ravi

  • Participant
    Level: Master
    Posts: 163
    Audiomonk on #25027

    I can see it is the same on yours, so am not sure what is changing it on my website.

  • Keymaster
    Level: Yogi
    (BuddyDev Team)
    Posts: 3115
    Ravi on #25046

    Hello Audiomonk,

    Please try the following code. It will filter the canonical URL for single media page.

    
    /**
     * Filter canonical url
     *
     * @param string $canonical_url Canonical url.
     * @param int    $post_id Post Id.
     *
     * @return string
     */
    add_filter( 'the_seo_framework_rel_canonical_output', function ( $canonical_url, $post_id ) {
    
    	if ( ! function_exists( 'mpp_is_single_media' ) || ! mpp_is_single_media() ) {
    		return $canonical_url;
    	}
    
    	$media = mpp_get_media( $post_id );
    
    	return mpp_get_media_permalink( $media );
    
    }, 99, 2 );
    
    

    Let me know if it works or not.

    Regards
    Ravi

  • Participant
    Level: Master
    Posts: 163
    Audiomonk on #25047

    Hi Ravi,

    It didn’t work unfortunately. Both links stayed the same when I ran the URL through the facebook debugger. After I tried this, I disabled The SEO Framework and the two links matched, but then facebook said the image wasn’t defined correctly. I checked the OG tags and they were defined correctly? Really am stuck on this one.

  • Keymaster
    (BuddyDev Team)
    Posts: 24623
    Brajesh Singh on #25079

    Hi Audiomonk,
    I am sorry for the trouble.

    As we were not able to reproduce it, we are lost here.

    If we provide you admin details for the above demo installation, Will you be able to help us reproduce the issue?

    Thank you
    Brajesh

  • Participant
    Level: Master
    Posts: 163
    Audiomonk on #25125

    I know the feeling of being lost Brajesh. Thanks for all of your and everyone else’s help with this. I don’t think I’ll be able to reproduce it on your demo installation, you can easily see it on mine, if you go to a sample gallery, for example..

    Right this very moment,I think I know now what is causing the problem. The galleries won’t show to anyone who isn’t logged in. So when facebook is trying to scrape, they aren’t logged in so they’ll get redirected to the home page. I just have to find out the setting to allow the public to see the galleries. I’m almost certain now this is the case.

    I might find it in the meantime, but in case I don’t, where would the setting be to allow the public to see the galleries and images in the galleries?

  • Keymaster
    (BuddyDev Team)
    Posts: 24623
    Brajesh Singh on #25137

    Hi Audiomonk,
    That explains it. Is your gallery/media non public? Only public gallery/media are visible.

    Regards
    Brajesh

  • Participant
    Level: Master
    Posts: 163
    Audiomonk on #25150

    It’s been that long since I changed any settings, where would I change it so that member galleries are viewable when not logged in ?

  • Keymaster
    (BuddyDev Team)
    Posts: 24623
    Brajesh Singh on #25177

    Hi Audiomonk,
    To set the default status globally, Please visit Dashboard->MediaPress->settings.

    For existing Gallery and Media, you will need to change it manually. Changing the gallery permission will not make a private media public. You will need to edit it (you can bulk edit from gallery page) for the media too.

    Regards
    Brajesh

  • Participant
    Level: Master
    Posts: 163
    Audiomonk on #25203

    You’ve been so helpful, thanks, I will take a look at this just now.

You must be logged in to reply to this topic.

This topic is: not resolved