Pass values from a post to the template header tags
up vote
0
down vote
favorite
Basically i want to pass an Image url from a post to the open graph image meta tag so i can choose which image to show on a facebook post.
I found this solution, but it only work if your fist image is what you want be shown, it didn't give you control.
<b:if cond='data:blog.postImageThumbnailUrl'>
<meta expr:content='data:blog.postImageUrl' property='og:image'/>
<b:else/>
<meta content='[The image url]' property='og:image'/>
</b:if>
Thank you
blogs blogger facebook-opengraph
add a comment |
up vote
0
down vote
favorite
Basically i want to pass an Image url from a post to the open graph image meta tag so i can choose which image to show on a facebook post.
I found this solution, but it only work if your fist image is what you want be shown, it didn't give you control.
<b:if cond='data:blog.postImageThumbnailUrl'>
<meta expr:content='data:blog.postImageUrl' property='og:image'/>
<b:else/>
<meta content='[The image url]' property='og:image'/>
</b:if>
Thank you
blogs blogger facebook-opengraph
open graph images should not be changed. they get cached.
– luschn
Nov 11 at 14:30
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
Basically i want to pass an Image url from a post to the open graph image meta tag so i can choose which image to show on a facebook post.
I found this solution, but it only work if your fist image is what you want be shown, it didn't give you control.
<b:if cond='data:blog.postImageThumbnailUrl'>
<meta expr:content='data:blog.postImageUrl' property='og:image'/>
<b:else/>
<meta content='[The image url]' property='og:image'/>
</b:if>
Thank you
blogs blogger facebook-opengraph
Basically i want to pass an Image url from a post to the open graph image meta tag so i can choose which image to show on a facebook post.
I found this solution, but it only work if your fist image is what you want be shown, it didn't give you control.
<b:if cond='data:blog.postImageThumbnailUrl'>
<meta expr:content='data:blog.postImageUrl' property='og:image'/>
<b:else/>
<meta content='[The image url]' property='og:image'/>
</b:if>
Thank you
blogs blogger facebook-opengraph
blogs blogger facebook-opengraph
edited Nov 10 at 19:16
asked Nov 10 at 19:04
habibhassani
145212
145212
open graph images should not be changed. they get cached.
– luschn
Nov 11 at 14:30
add a comment |
open graph images should not be changed. they get cached.
– luschn
Nov 11 at 14:30
open graph images should not be changed. they get cached.
– luschn
Nov 11 at 14:30
open graph images should not be changed. they get cached.
– luschn
Nov 11 at 14:30
add a comment |
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53242428%2fpass-values-from-a-post-to-the-template-header-tags%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
open graph images should not be changed. they get cached.
– luschn
Nov 11 at 14:30