• Resolved techiechic

    (@techiechic)


    I have a blog post that I have made password protected because I don’t want users to see the content without the password. However I want them to have a good preview if I share the post on Facebook. I have explicitly set a Facebook image and description for that post and it does not show up in the meta data. I understand not wanting to show the protected content, however if I’ve explicitly set Facebook teaser information for the post I think it ought to show up in the OG meta data.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Support Michael Ti?a

    (@mikes41720)

    Hi,

    Can you confirm if you have the latest version of Yoast SEO for WordPress v16.1.1 and could you let us know how you’ve set up the blog post to be password protected? Are you using any sort of plugin to set a password for that particular post?

    We do know that there should be a minimum output, but in general, for password-protected posts, it should just be the title and meta description as per this GitHub issue.

    Thread Starter techiechic

    (@techiechic)

    Hi Michael,

    Thank you for your help with this. Yes I am using the latest version of Yoast Version 16.1.1. I am just password protecting it with the default WordPress functionality – by setting the visibility of the post to password protected. No other plugins are used for that functionality.

    I do understand not wanting to scrape a protected post’s content for images (which was the issue in the GitHub post as I understand it). However, if the user has explicitly set data for Facebook on that post I would expect that to be displayed. The only reason to put any content in those fields is if we want it shared to Facebook – there’s really no good reason for me to manually fill those fields with anything proprietary. Even defaulting to the generic content from the main Yoast settings page(if set) also seems preferable to replacing the Facebook content with just “this cannot be displayed” – since that’s not going to get me a lot of clicks.

    I did use the code from this tutorial which has enabled me to at least get the description tag populated for Facebook, but I don’t know how to plug in to the Yoast functionality to get the og:image tag set up too.

    I’m happy to write my own code to fix this if you can point me in the right direction for how to override the blanking out of the password protected post’s Facebook data. I know it’s a weird use case – usually password protected posts aren’t really meant to be shared so most users probably aren’t too worried about this. I’m posting this particular post in some specific Facebook groups with the password, but I don’t want random users on the internet gaining access to it without some verification that they belong.

    Let me know if I can be of any further help! (Sorry I’m so long responding… I wrote this all out and thought I sent it, but I just opened up this tab again and realized I hadn’t clicked “Submit” ???♀?)

    Plugin Support Michael Ti?a

    (@mikes41720)

    Hi,

    It’s definitely not a regular use case, as if you set a password to your post or page, that would indicate that you wouldn’t want to share that link publicly.

    We’d like to point you to our developer portal where you can review all of the documentation if you want to modify the plugin to fit your needs better if you really need the open graph metadata to output for password-protected posts — https://developer.yoast.com/

    Plugin Support devnihil

    (@devnihil)

    We are going ahead and marking this issue as resolved due to inactivity. If you require any further assistance please create a new issue.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Facebook OG image not set on password protected post’ is closed to new replies.