My site uses a custom content type that is essentially an article. Each page offers a Facebook share link, and I created and configured a new meta tag default for this content type.
Anonymous users can share nodes of this content type and everything works perfectly when displayed on facebook; the appropriate title, image and summary appear along with the link. Anonymous users share an http url.
Authenticated users can share the exact same node, except it's accessed via an https secure url. When authenticated users share this on facebook, it is displayed with the global website image and description.
I understand this is a facebook issue, but functionally I am not achieving my desired outcome. Is there a token I can enter into the og url field that will output the non-secure url? Or is there some other way to allow authenticated users to share the non-https address? I would be very grateful for any guidance.
| Comment | File | Size | Author |
|---|---|---|---|
| #9 | 1412238-add_secure_url.patch | 1.14 KB | aidanlis |
Comments
Comment #1
grasmash commentedYou can just use the theme_metatag_opengraph() function in your template.php file to process the tag before it is output:
Comment #2
damienmckenna@madhatter23: thanks for providing a solution.
This is such an edge case I don't think it needs further documenting.
Comment #4
aidanlis commentedWhat about supporting og:image:secure_url?
https://developers.facebook.com/bugs/405588419493203
Comment #5
damienmckenna@aidanlis: That's the opposite of what he's trying to do, but good tip anyway.
Comment #6
aidanlis commentedThis was my quick hack to strip out the https and preprocess the image:
Comment #7
damienmckennaYou could also use hook_tokens_alter.
Comment #8
damienmckennaComment #9
aidanlis commentedHijacking this issue, sort of, as this is the issue that shows up in google searches.
We need to support og:image:secure_url, via http://ogp.me/#structured
Comment #11
damienmckennaPlease open a new issue for this new tag.