It doesn't really matter. The slash vs no slash is leftover from the xhtml days. I tend to like it personally, but you can go ahead and remove it if you don't. Either way the browser should treat it the same as far as I know
Anything on the webpage can be dynamic as long as you have control over the server that's serving the files. If so, I'd check out a rendering engine like ejs for passing in variables
Hi Thanks for this - Very useful - I have a requirement where I want to show a dynamic og:description - It needs to have an Amount field - For Example - Bank A wants to send you £10. Or Bank A wants to send you £30 .. How to get the dynamic amount field ?
If you have a custom site, you should be rendering the page your serving to your client with the value you need. If it's not a custom site, and is more like a squarespace or wordpress site, this is more difficult. The easiest way to do something like what you're talking about would be to use something like Google Tag Manager that would let you inject a custom script into your page to select your og:description element and change it based on a data layer variable. The way your changing your value would depend a lot on where that value is coming from.
The open graph protocol is a standard so it'll work regardless of the language or framework you're using as long as it's valid HTML that's being served... that being said, if you're testing this on localhost then an application like Facebook or Twitter is not going to be able to access the data when you do something like paste the link. The only way to make it work locally would be to use something like localtunnel so that there is a public URL that can be used.
So you need to be able to dynamically set those properties for each blog page... if you're in control of your server, you can modify those properties before serving the page. If you're using something like wordpress or squarespace, you'll need to most likely use a plugin or write some custom code to achieve this.
Unfortunately, as far as I know there is no way to tell FB, or any other service that uses open graph, how to format the information they display... so I do not believe they let you hide it
@@It_guy613 I'm assuming it's just an aesthetic preference... for instance, they may have a graphic that has the title in it already... so displaying the title would be redundant
it is very interesting to know that different social medias display different informations... great video!
Question: code validation says I shouldn’t have the trailing slash at the end of the tag. What’s your thoughts on this?
It doesn't really matter. The slash vs no slash is leftover from the xhtml days. I tend to like it personally, but you can go ahead and remove it if you don't. Either way the browser should treat it the same as far as I know
Thanks
Thanks for the video
Thumbs-up, man. Can I make the URL dynamic?
Anything on the webpage can be dynamic as long as you have control over the server that's serving the files. If so, I'd check out a rendering engine like ejs for passing in variables
Hi Thanks for this - Very useful - I have a requirement where I want to show a dynamic og:description - It needs to have an Amount field - For Example - Bank A wants to send you £10. Or Bank A wants to send you £30 .. How to get the dynamic amount field ?
If you have a custom site, you should be rendering the page your serving to your client with the value you need. If it's not a custom site, and is more like a squarespace or wordpress site, this is more difficult. The easiest way to do something like what you're talking about would be to use something like Google Tag Manager that would let you inject a custom script into your page to select your og:description element and change it based on a data layer variable. The way your changing your value would depend a lot on where that value is coming from.
is this work on local host if i use laravel
The open graph protocol is a standard so it'll work regardless of the language or framework you're using as long as it's valid HTML that's being served... that being said, if you're testing this on localhost then an application like Facebook or Twitter is not going to be able to access the data when you do something like paste the link. The only way to make it work locally would be to use something like localtunnel so that there is a public URL that can be used.
How to do that to every bloog articel ??
Now when i post my articels to Fb they all have the same image and titel 😅
So you need to be able to dynamically set those properties for each blog page... if you're in control of your server, you can modify those properties before serving the page. If you're using something like wordpress or squarespace, you'll need to most likely use a plugin or write some custom code to achieve this.
Awesome
How can i hide og:title
Unfortunately, as far as I know there is no way to tell FB, or any other service that uses open graph, how to format the information they display... so I do not believe they let you hide it
Why would you wanna do that
@@It_guy613 I'm assuming it's just an aesthetic preference... for instance, they may have a graphic that has the title in it already... so displaying the title would be redundant