Open Graph Protocol

Topics: Customizing Orchard, General
Apr 19, 2013 at 8:10 PM
Edited Apr 19, 2013 at 8:11 PM
Hello Everyone,

Hope all is well. We are currently using Orchard to revamp our company website (nonblog). As we finish things up, the last bit to implement is open graph coding so our pages render properly in the newsfeeds of social media platforms. As my research has run cold I am left with a couple of unanswered questions:

Does Orchard support Open Graph?
Are their any modules that support or assist in implementing Open Graph?
Has anyone been successful implementing such on their non-blog website?

Thank you in advanced!
Apr 20, 2013 at 12:11 AM
Open Graph uses the a property attribute in the meta tag, right? I don't think Orchards resourceManager.SetMeta() method supports this. But you could create your own custom implementation. Check out Orchard.UI.Resources to see how it works :)

And there are no Open Graph modules available, that I know of. I'm sure one would be appreciated though ;)
Apr 22, 2013 at 2:16 PM

You are correct that Open Graph is an attribute in the meta tag. We are using the Vandelay Industries Package module as the source for our regular meta tag creation I was hoping to squeeze the OG within the code that the module builds but it may not work according the the module creator. I may have to get my "programmers hat" on and see what I can come up with.

If anyone else has any insight/tips for implementing Open Graph it would be very much appreciated!
Apr 23, 2013 at 11:02 AM
You can well use the ResourceManager for this. You can add OG metas like this (from a template, but the same is possible from C# code):
var meta = new MetaEntry { Name = "OG " + name, Content = value };
meta.AddAttribute("property", "og:" + name);
AppendMeta(meta, "");
I maintain the Facebook Suite module, if you're interested in developing OG functionality we could collaborate on that :-).