You are here: Home / Wordpress Plugins / Open Graph Protocol in Posts and Pages

Open Graph Protocol in Posts and Pages

VERSION 2.0.0:beta
Download This Plugin

The Open Graph Protocol in Posts and Pages WordPress Plugin allows you to very easily add OG meta tags on a per post or page basis, or use your default OG settings across the site.

The Open Graph WordPress Plugin adds an additional meta box to the post and page editing screen for you to enter og meta values for that post or page.

When the post or page is liked or shared on Facebook and other Open Graph sites, the title, description and url along with other items are automatically pulled in from the meta vaues added in the box.

If your WordPress posts and pages keep automatically pulling the wrong content into Facebook when people link to them this plugin will solve your problems.

Thanks to the guys at http://www.whoishostingthis.com/ for help with all the testing.

Usage

Add the required values to the open graph protocol meta box on the post and page editing screens.

  • post|page url overrite – Specify the url for a post or page, uses the permalink if not specified, no default value
  • post|page Title – This is the title of the post or page, you may want it to be shorter than the current title, so you will need to add it in again.
  • post|page Type – This is the category that the post or page falls under on the social graph, for a blog post, it is best to select websites > blog
  • post|page Image – This is the image that is displayed along side the content that the OG pulls in, be sure to use absolute urls
  • post|page Description – This is a short description of the post or page, like an excerpt
  • Facebook Profile ID – This is the numbered profile id for facebook
  • Address – An address relevate to the post or page
  • Contact – Contact details relevant to the post or page.

Also, the site_name is added automatically, which is the name of your site, as set it general settings

As you may want to use the same entries site wide (such as Facebook Profile Id, Address and Contact), there is a form on the OGP settings page to allow you to set default options that posts/pages then override, saving you entering the same information 1000’s of times.

NOTE: Changes in the Meta tags may take up between 24-48 hours for sites like Facebook to recognise

Also, for people using the All in One SEO pack for their SEO options, this plugin also integrates with the All in one pack for the title and description entered into the AIO options

Comments

  1. Hi,
    I just started using your plugin and love it! I have a client who wants to have multiple thumbnail images available when they post a link to their website on FB. Is there a way to do that in your plugin? I know Facebook has a reference to it here: http://developers.facebook.com/docs/opengraph/ (which basically says this: “You may include multiple og:image tags to associate multiple images with your page”) but I’m not sure how to add multiple image tags in a WordPress install or in your plugin. Any ideas?
    Thanks!
    -Geej Mauriva

    • Hi Geej

      Thank you for your comment, this is something we will implement in the next update for the plugin which will be released in the next couple of days :)

      Thanks,
      Jamie

      • Hi Geej

        I have released an update for the plugin to support the multiple images which will be available in around 15 minutes.

        Just add your images into the imagebox as normal, but separate each image with a vertical bar ( | )

        please take 2 mins to help support the plugin and use any of the promotion suggestions on the plugins admin page

        Thanks
        Jamie

  2. Hey there, I’m trying to use your plugin for a client’s site and on the surface it does what I need (in theory).

    I’m getting an error (“Warning: Invalid argument supplied for foreach() in /home/content/50/5323950/html/mfmusicstudio/wp-content/plugins/open-graph-protocol-in-posts-and-pages/OGP.php on line 252″) when I try to use the plugin. Page can be found at: http://www.mfmusicstudio.com.

    Thanks.

    • Hi Carlos,

      Unfortunaltely i have not been able to re-create this error, or see it on the site you posted so cannot provide support for this.

      I have a vague idea of what is causing it and it is non-fatal, i have added in an if statement that should hopefully prevent the problem again.

      Thanks
      Jamie

  3. Jamie,
    Thanks for the reply. I was in the midst of trying to find a solution last night and had to disable your plugin.

    I’ve re-enabled it with the new update and I’m not getting the error…. so thank you! But looking at the source code, I’m not seeing the meta tags that I have added. I know all the information is in there because I can see in the admin section and I also see it when I go to the page / post admin.

    Thanks again… this plugin looks to be EXACTLY what I need. All the other plugins’ features kind of blows.

    Carlos

  4. Yep that worked! Awesome!

    Any reason why the default values weren’t working until I re-saved things? Will I have to re-save all my pages/posts for the OGs to show up?

  5. Ok… spoke to soon. Looks like the plugin is picking up the Image URL. Ran the URL thru Facebook’s lint tool (http://developers.facebook.com/tools/lint) and threw an error about the missing image.

    BTW… sorry for hijacking this thread. Do you want me to take this offline with you?

    Cheers,
    Carlos

    • this is the support area for the minute :)

      Okay the last bit was an incompatibility with the last alterations, i have added a new version, or if you are technically minded, alter line 270 and change it from 1 < to 0 <

      the new version will be live in around 15 minutes.

      Thanks
      Jamie

  6. Perfect… works great with the tweak! I’m seeing the image and the Facebook linter is happy :)

  7. Hi, is there an escape character needed to us apostrophes in the Description field? It seems to stop displaying content after any apostrophe… thanks, great plugin!

  8. That’s excellent, thanks, just upgraded…
    I did just notice another, similar issue… double quotes marks now not working the Title tag? (Didn’t notice if they were before)

  9. I’ve got a few problems and one potential bug.

    First, despite having the correct default image (both in the settings for the plugin and in each post), that’s still not working. It’s just pulling an image from the post. In addition, the type is not correctly showing up. I set it as blog and it’s showing up in my source code as article. Finally, my FB id as admin (og:admin) isn’t showing up either. Basically, no matter what I set, the plugin seems to ignore it.

    In addition, I’m using both the Like and Share buttons. This duplicates the og data, which the linter doesn’t particularly care for. Guessing that’s not supposed to happen.

    Check out one example here: http://www.doseofdigital.com/2011/07/avoid-facebook-hacking-victim/

    I just updated to the newest version and that didn’t seem to make a difference at all. Any help would be appreciated.

    Thanks.

  10. Sorry…one more thing. I tried resaving a couple of posts as you suggested to one person, and that didn’t make a difference.

    • Sorry…yet another thing. All of my pages have the correct data from the plugin, but posts don’t. That’s odd.

      • Hi Jonathan

        I have just tested the link you provided in the above comments and it appears to be pulling in the data correctly.

        re the og:admin, it is actually fb:admin, its the only property preceeded with fb and not og so it may appear incorrect but it is infact fine.

        the like and share buttons are independant so we cannot check, or control what information they output to the header.

        We are working on an update to use the default options page values when the main page values are not present, e.g. type and image.

        I will also look into the possiblity of combining the plugin with the all in one seo pack meta options (mentioned below)

        Thanks,
        Jamie

        • Thanks. Got it all fixed by resaving the post after putting the information in. I figured that at least the prefilled info would appear even if I didn’t resave (default image, admin, type), but they don’t.

          Any way that you can update the plugin such that these values are automatically added without having to resave every page would be welcomed. Not sure how you’d do it though.

          Disregard my comment about the Like and Share buttons, that issue was caused by another plugin.

          Thanks,
          JMR

          • Hi Jonathan

            I have just released version 1.0.5, this contains integration for all in one seo pack’s title and description.

            I have also modified some of the code, so that the default entries are not shown on the post/page editor, and only if that field is left blank will it replace it on the page view.

            Hope this helps :)

            Thanks
            Jamie

            • Thanks…I’ll look out for the update.

              Not sure exactly what this change means though: “I have also modified some of the code, so that the default entries are not shown on the post/page editor, and only if that field is left blank will it replace it on the page view.”

              Having the defaults on the post editing page was fine, I think. I never want to change the default image, admin or type. Are these no longer prepopulated? Or if they’re left blank it uses the default.

              Thanks.

              • Okay, ignore this part, the pre-population has been added back in, however it does leave the option to remove the pre-populated and use the default directly, if it is wished.

                if you have already downloaded 1.0.5 just delete it and re download it :)

  11. when i click share or like on my pages it still isnt pulling the right information, but if I use the add this button and share to facebook through there it does. what am i doing wrong?

    • Chris Gilchrist says:

      Have you populated the OG information on the pages and posts you are sharing? In the edit screen scroll down past the WYSIWYG editor and fill in the og info then retry.

      NB: It can take 24 hours for FB to pick up new OG info so if you’ve only just done it you may need to wait a while

      • i can get it to work on pages but posts is totally different. i installed your plugin and then made a post and filled out all info in the OGP section …its been about 24 hrs…nothing. I dont understand how add this has the info but fb doesnt and waiting 24 hrs is not good when im publishing articles that are time sensitive and people will share right away. so frustrated.

        • Chris Gilchrist says:

          Can you give an example url of a page it’s working on and a post it isn’t working on but which add this does and i’ll take a look

      • I’ve updated it there. In fact, the default information that I put into the main settings is there. This includes the URL for the image and my admin id. Neither of these actually show up though in the source code of the post. If they aren’t in the source, then FB isn’t going to ever pick them up much less 24 hours later. I’d think they should immediately be visible in my post source.

        Here’s one example: http://www.doseofdigital.com/2011/07/avoid-facebook-hacking-victim/

        • Chris Gilchrist says:

          Hi Jonathan, I can see your OG meta data on line 150 of the source code?

          • Not sure what the change was, but I resaved my post and it appeared. That’s why you’re seeing it there.

            Seems like a major headache to resave every one of the 200+ posts I have on my site to make this work for each of them though. Is there some other way to make this a bit more automatic? As it stands, I have to update a title and description for each so that it saves all everything including image and admin.

            Thanks.

            • Chris Gilchrist says:

              Will have a look and see if it can pre populate. Do you have excerpts on each post already?

              • Thanks. I don’t use excepts. I’ve been using All in One SEO tool to handle titles and descriptions for each post, so the appropriate meta data exists, but I still need to copy and paste over to OGP and resave to get them to show up as og tags.

                It looks like the plug in adds og:url and og:site_name automatically without resaving on both posts and pages. If only it could do the same for the default image, title and admin tags. That would be a result.

                Thanks.

              • Chris Gilchrist says:

                We’ll have a look. If it’s possible to pull in defaults from All In One SEO then we’ll add that feature as it’s so widely used (even though I don’t think it’s the best solution any more).

                We’ll also look at the other issues you raised earlier in the week but it will be Monday before we do as lots of nice clients are keeping us busy with projects :)

  12. if you go here
    http://thecurrentconscience.com/blog/2011/07/14/a-change-of-heart-the-real-housewives-can-do-real-damage/

    and click the orange + button that is to the left of the post and then click facebook, the info it is pulling is correct.

    but if on the same page (at the bottom) you click the Facebook SHARE, a window pops up (SIDE NOTE: This pop up window is sized too small so you must resize it to even see anything. I tried asking the people who made the theme I have installed how to change this, but they claim it is a facebook problem and I havent figured out how to yet because i dont believe them.).

    This info is wrong even though everything is filled out in the OGP panel (in posts, not the settings panel…that is blank)

    on the next post

    http://thecurrentconscience.com/blog/2011/06/29/shes-not-a-time-bomb-are-men-teaching-kids-to-respect-women/

    the info pulled when you click SHARE has the wrong description. it is the site description instead of the description i put in the OGP panel.

    • Hi,

      Looking at the links you have supplied, it would appear neither page is using the og plugin created by us, As such, it proves very difficult to provide support.

      Thanks
      Jamie

  13. i want to ask a question about open graph protocol with facebook like . can the image be updated ?with every post because i can nt make it updated !

    • Hi Simon,

      the image should be updatable on a per page basis and that the should be immediately visible in the source code but may take a while to update on facebook.

      Thanks
      Jamie

  14. I need to be able to override the og:url metatag for any individual post/custom post type or page because of a few plug-ins and call them something other than their default value.

    Is it possible for you to provide a field on http://url/wp-admin/post.php?post=postnumber&action=edit and http://url/wp-admin/post-new.php called something like “Open Graph Permalink” (“OGP”) so I can manually add the url I want to show up in the open graph?

    What I need to happen is this: If there is nothing in the OGP field (the admin doesnt enter a value), then your plug-in uses the posts url as the og:url as is. But if the admin puts a url in the field? Your plug-in uses this new url as the og:url metatag instead.

    Thank you for the consideration and yes I will definitely support your plug-in if you can make this happen…

    • Hi E,

      This feature has been added into the latest release of OGP which was released this morning, version 2.0.0:Beta.

      Thanks
      Jamie

      • Looks great. But it doesnt seem to work w custom post types…?

        • Hi E,

          The plugin isn’t natively designed to work with custom post types as each custom post type could be registered with its own slug e.g. “product”. and so the editor box doesn’t register.

          this is something we will look into doing though

          thanks
          Jamie

  15. The latest bug fix for 1.0.5 renders all my pages unusable. The .css is all over the place and I have had to deactivate the plugin. It was working perfectly before this update. How can I restore to previous version?

    • Hi Paul,

      Can you provide an example page to view these errors as it is working fine on our site and our development site.

      Thanks
      Jamie

      • Hi Paul,

        Thank you for the screen shots, i have hopefully been able to identify the issue and fixed the plugin.

        We have released version 2.0.0:BETA which will be available soon with these repairs.

        Thanks
        Jamie

  16. Hi, same issue here as Paul — problem after upgrading to 1.0.5; had to deactivate, so can’t provide example page, but here’s what was happening:

    In the main content area of posts and pages, no images, links, nor shortcodes were being rendered; and, what text there was, was being truncated after 100 or 200 characters roughly…

    Interestingly, I think I had this same issue with another open graph protocol plugin I tried, if that helps…

  17. I’m sure that’s where the trouble is, but I have no idea where to look… it’s using Thesis theme and about 26 plugins…

  18. I updated to 2.0.0:Beta and problem appears to be solved — nicely done!

    • Chris Gilchrist says:

      Thanks Mike. If you get a chance please support us and the plugin in any way you can. There are suggestions on the plugin’s admin pages on different ways you can do this :)

      Hope you enjoy the plugin

  19. I installed this on two different sites. On one with a default theme, it’s functioning as should. With a custom developed theme (I’ve done a few but first time I’ve seen this), the plugin doesn’t actually load on pages. Is there some function that I need in a theme in order for this to work?

    • Hi Seth,

      The plugin adds the meta information by hooking on to the wp_head call, so you need to ensure that this is called on the page template.

      I hope this helps,

      Thanks,
      Jamie

  20. Not yet tried your plugin but what I need is that it could dynamically take the post thumbnail. Once configured does the plugin find the first image in the post and uses it to share the post on Facebook? Thanks

    • Chris Gilchrist says:

      You can set which image you want to use as the featured image on a post by post basis along with the other info such as title, description, url etc

  21. Hello Hitreach,

    I have installed your excellent plug-in (many thanks) & am using it to post videos on to Facebook. It works well, except that the video will not play inside FB, it only links to the blog post (which may or may not be a good thing).

    I believe that adding additional metadata fields may allow playing within FB, possibly the following? (examples only).

    I got this from Long Tail Video support:
    http://www.longtailvideo.com/support/blog/19150/publish-your-videos-to-facebook-with-a-jw-player

    Thank you again, saved me a lot of messing with php & custom fields, almost there :)

    Nico Morrison
    London UK

    • Hi Nico,

      Thank you for your comment, I’m glad you like it.

      I have just updated the plugin to have the OG video tags that are in the example provided, hopefully is helps solve your problem.

      If you like the plugin, please use the options on the plugin options page to show your support.

      Thanks,
      Jamie

  22. Hi Jamie,

    Emailed you directly as this form deletes all code for some reason I should understand but don’t :)

    Very impressed with the speed & accuracy of your update, isn’t showing the play arrow (yet?) as I’d already posted the video and had to delete it & repost, maybe cached in FB.

    Facebook debug warns only that I have to add in og:locale explicitly which I’ll do and the graph looks good. Links in my email.

    Thanks & I’ll certainly be popularising this if it works playing in FB using the Long Tail video player, a popular player.

    Nico M
    London UK

  23. Hello,

    I installed your plugin to be able to choose the picture to show on facebook when sharing.
    But it doesn’t work, it keeps showing me a picture or another, usually among the other social icon buttons on the post/page (and I need to use the description metabox and re-save the page , or it displays the text in the sidebar if there is some, instead of the page text itself)
    The text is the right text I wrote in the new meta box, and when I check with the facebook debug tool, everything looks all right (http://developers.facebook.com/tools/debug/og/object?q=http%3A%2F%2Fdelimeexecutivesearch.com%2Fgb%2Four-services-2%2Fperformance-management%2F), so I can’t understand why the proper picture is not showing on facebook walls.

    If you may help, that would be great. Thanks

  24. Hello,

    I have a problem with pictures on facebook when sharing (like button). The title and text are OK, they are the one from your new metabox. But it keeps pulling a random picture from the page, usually one of the other social icon pic.
    It has been 24 hours since I made the changes, and according to facebook debug tool, it sees the text and photo I need, so I can’t understand why it is not the good picture displaying (the same for all posts…nothing difficult!)

    Tnnaks for your help.

    • Hi Cecile,

      if it is pulling everything in correctly to the fb og debug then it is more likely to be an issue with Facebook rather than the plug-in itself.

      Try using a different image?

      Thanks,
      Jamie

  25. Hello,

    I’m using version 2.1.0BETA, and I have a problem with this plugin displaying the correct meta data… I set the page type to “Website” in the page editor, but for some reason the type is being displayed with the image url…

    Since you minified the code, it’s really hard to read. If I could read it I would tell you exactly where the bug is and help you out.

    Please fix this and upload a new version.

    Thanks,
    –Greg

    • Hi Greg,

      Thank you for bringing this up, I have fixed the issue with the plugin and re-released this morning.

      As for the suggestion of the single post/page title, that was in previous versions and has been added in again.

      Thanks,
      Jamie

  26. Another suggestion…. When displaying a single post / page, then you should default to the post/page Title instead of the default title in the OG Settings section.

  27. Hi, I installed the plugin and after more than 24 hours, it is giving this error:

    More Than One OG URL Specified: Object at URL ‘http://www.gingerchai.com/2011/11/01/ten-fixes-for-fatigue/’ of type ‘article’ is invalid because it specifies multiple ‘og:url’ values: http://www.gingerchai.com/2011/11/01/ten-fixes-for-fatigue/, http://www.gingerchai.com/2011/11/01/ten-fixes-for-fatigue/.
    Missing Required Property: The og:url property is required, but not present.
    Missing Required Property: The og:type property is required, but not present.
    Missing Required Property: The og:title property is required, but not present.
    Body Meta: You have tags ouside of your . This is either because your was malformed and they fell lower in the parse tree, or you accidentally put your Open Graph tags in the wrong place. Either way you need to fix it before the tags are usable.

  28. I’m getting this error:

    Warning: Missing argument 2 for get_post_meta(), called in /data/26/1/91/156/1743645/user/1883681/htdocs/Blog/wp-content/plugins/open-graph-protocol-in-posts-and-pages/OGP.php on line 14 and defined in /data/26/1/91/156/1743645/user/1883681/htdocs/Blog/wp-includes/post.php on line 1458

    Page – http://searchsocialmarketing.com/

    • Hi Jenn,

      Good spot!

      This isn’t so much of an error, it’s just a warning that a second argument is missing, this warning can be hidden by turning wp_debug off in the blog config file.

      OGP is currently going though a series of revisions, adding in new OG meta tags, and this warning will be removed in the new release.

      Thanks,
      Jamie

  29. Hi,
    im trying to see if I can use this plugin to share videos on Facebook timeline,using the Flowplayer. is the plugin suitable for doing that?

    Thanks

    Mike

    • Hi Mike,

      The plugin is used primarily to add the OG meta tags to the post and page.

      From tests, we have worked out that Flow Player can be used to add videos to the facebook news feed (props to Nico for helping with that :) ).

      With regards to the timeline, if it supports the OG tags in the same way as the newsfeed does, then it should all be okay :)

      Thanks,
      Jamie

  30. Hi,Jamie
    Thanks for your very fast reply :)
    are you sure you are talking about Flowplayer and not JW player?
    I was reading up on the comments above and I can see that Nico was working on JW Player.
    FlowPlayer is very similar to JWplayer, runs on application/x-shockwave-flash, so I gave it a try. i got thumbnail image with play button over it ,but when I press play I get white blank.

    This is what Flowplayer guys are saying about sharing on FB. very similar to JWs Tags right?
    http://flowplayer.blacktrash.org/fbshare.html

    Do you have any suggestions?
    I know this Plugins primary purpose is not video share, but I think Flowplayer user will like this

    best regards

    Mike Yama

    • Hi Mike,

      We will look into adding the new tags in the near future, they only have additional video tags, but as far as i’m aware facebook only use the OG tags and not the plain video tags.

      Thanks,
      Jamie

  31. hey! your plug-in worked with Flowplayer!
    thanks a lot :)

    mike

  32. Hi,

    I’ve installed your plugin and am trying to use it to share video so it embeds and plays in Facebook. The video in question is a youtube video. Unfortunately, it’s not working – when somebody shares it on facebook it shows up there with the little arrow but then when you click the image goes away and there is a blank box. Any ideas why this might be happening. http://americanspaz.com/the-film/

    I will definitely become a supporter as I think this is a great tool.

    Thanks so much,
    Greg

  33. Hi
    Ive been trying to get this working with jwplayer and it wont work.

    In the admin field to add info for “Video: Src” jw say you have to link the swf player along with the argument, so what you end up with should be something like;

    http://www.example.com/jwplayer/player.swf?file=http%3A%2F%2Fwww.example.com%2Fbunny.flv&autostart=true

    However when i enter my url like this and click save, most of the information has been cut off usually from point here:

    http://www.example.com/jwplayer/player.swf?file=

  34. Hi,

    I installed some meta tags in my wordpress blog (header file), example:

    And this are working fine with all wordpress posts and pages but it fails with home (main page). Seems that Facebook can’t find these meta tags in my home, but they are in source code.

    This is the home and this is one post example.

    I really don’t know what is causing this error, so i can’t fix it.

  35. Hi,

    I have installed some meta tags in my wordpress blog (header file)…

    And this are working fine with all wordpress posts and pages but it fails with home (main page). Seems that Facebook can’t find these meta tags in my home, but they are in source code.

    This is the home (http://www.portodemosonline.com/) and this is one post example (http://www.portodemosonline.com/agenda/teatro-dia-de-reis-serro-ventoso.html).

    I really don’t know what is causing this error, so i can’t fix it.

  36. Hi I installed the plugin and added some metadata to a post, but no matter how many times I update (resave) the OG metadata wont load (see: view-source:http://www.emarketeers.com/e-insight/using-twitter-search-effectively/). any thoughts?

    (I’m using v 2.1.0.1 beta)

  37. Hi Greg,

    Nothing was found for the page you provided.

    Try setting the video tags as well as the custom post url override tags and seeing if that works,

    Thanks,
    Jamie

  38. Hi Jonathan,

    Try setting the plugin default options first to see if that works :)

    Thanks
    Jamie

  39. Hi Ian,

    There was mention about the JWplayer implemention further up the comments, have a read and see if that helps.

    Thanks
    Jamie

  40. Hi Jamie

    Presumably “default options” implies not adding any data into the fields.

    I tried both empty fields and filled fields and either way all I get on the published page is:


    Any thoughts?

    J

  41. Hi Jonathan,

    The default options I mean are in the wp-admin/options-general.php?page=OGP_settings page,

    This specifies the fall back options for all pages

    Thanks
    Jamie

  42. Hi
    This a great plugin!
    However, I get one error:
    Notice: Undefined variable: ogpversion in my-site.com/wp-content/plugins/open-graph-protocol-in-posts-and-pages/OGP.php on line 14

    Am I doing something wrong?

  43. Hi Danny,

    What version of the plugin are you using?

    The notice is caused by PHP error reporting and a missed variable declaration, so on line 13 of the plugin, find the first mention of ogpversion, and before it add $ogpversion=””;

    This should solve your problem.

    thanks,
    Jamie

  44. Hi,

    Im using your plugin and i have one doubt, why i must add a facebook profile ID? In my case the website is related to page and not profile. Should i use the profile ID of page admin ?

    Thanks
    Bruno

  45. Hello…I read rave reviews about this plugin and i want to make it work for my site too. After instaling and heading over to FB lint…it outputs this:

    More Than One OG URL Specified: Object at URL ‘http://blog.metalbabemayhem.com/’ of type ‘website’ is invalid because it specifies multiple ‘og:url’ values: http://blog.metalbabemayhem.com/, http://blog.metalbabemayhem.com/.

    The above is for basically every page!

    also i get the following:

    Inferred Property: fb:admins and fb:app_id missing. fb:admins or fb:app_id is necessary for Facebook to render a News Feed story that generates a high clickthrough rate.
    Inferred Property: og:image missing. og:image meta tag is necessary for Facebook to render a News Feed story that generates a high clickthrough rate.

    Please help me :-)

    Thank you

  46. Hi Alison,

    A quick look at the source of the url, you must have a second plugin enabled that specifies og:url as well, it may help to remove the second plugin, for the Facebook admins, you can just add your own Facebook id into the options box. you can usually get your Facebook id from any url within Facebook which has a fbid= as a GET string.

    Thanks,
    Jamie

  47. Hi Jamie!

    Is there a way to make the plugin get the featured image of a post and use this on
    meta property=”og:image” content=”featured image’s url”?
    My posts have a featured image configured, but to see this image on facebook, I have to write (manually) the image url into the plugin. If I leave this field empty facebook shows a wrong image :-(

    thanks for the great job!

    • Hi Juba,

      Thank you for the suggestion, it is definitely something we will incorporate in future releases, however currently there is not support for it.

      Thanks,
      Jamie

  48. How can I make the code to appear on wp e-commerce product pages?
    I thought something like:

    function OGP_output_to_postbox(){
    add_meta_box(“OGP”, “Open Graph Protocol”, “OGP_postbox”, “post”, “normal”, “core”, array(‘type’=>’Post’));
    add_meta_box(“OGP”, “Open Graph Protocol”, “OGP_postbox”, “page”, “normal”, “core”, array(‘type’=>’Page’));
    add_meta_box(“OGP”, “Open Graph Protocol”, “OGP_postbox”, “link”, “normal”, “core”, array(‘type’=>’Link’));
    add_meta_box(“OGP”, “Open Graph Protocol”, “OGP_postbox”, “link”, “normal”, “core”, array(‘type’=>’wpsc-product’));
    }

    But it doesnt work

  49. Dear Jamie,

    Happy New Year, I’m having problems with the plug-in reversing the height & width video values, trying to reverse them back is impossible.

    Anyone else reported this? I have a fully up-to-date 3.1.1 and no other OGP plug-in AFAIK, somewhere these 2 values are getting mixed up.

    Apart from that, wonderful plug-in & hope all goes well with you.

    Regards,
    Nico M

  50. Hi please where is the download link for the plugin?

  51. I got it but i don’t know how i can configure it to work since am using yoast

  52. Hi. Firstly thanks for a great plugin that’s very easy to implement. I have a major issue though … I can get it working on all posts and pages but the code fails to show on the homepage. Any ideas?

    • Hi Al,

      Have you set the default options for the plugin on the plugin options page? these are also used for the homepage.

      Thanks,
      Jamie

      • Thanks so much for this. I’d only filled in the image field in the default settings as I wanted to change each post/page for a unique title and description. I didn’t realise that these had to be included. All is working perfectly now. Thanks for the quick reply.

  53. Hi, your plugin is designed for Singular Open Graph,but what about category or archive pages?

    http://www.bjultrasonic.com/category/ultrasonic-generator/

    I found your plugin uses the 1st post’s Open Graph Data as the category page. Can you make improvement so we can set category Open Graph ?

    Many thanks.

    • Hi Jeriff,

      Thank you for the suggestion, this is something we will be looking to add in for the next major plugin release.

      Thanks
      Jamie

      • Another Question,how to enable this plugin on Woocommerce Product page?

        • Hi,

          On lines 385 to 390 of the OGP.php file, there are calls to the add_metabox function, simply duplicate one of these lines (or change the wpsc-product one) and change the type to be the post type of the woo commerce product.

          This can be found in the url of the edit page for a product, i think :)

          thanks
          Jamie

  54. Is your plugin have the feature of facebook that adds the new meta tag of facebook ‘read’ and ‘watch’ feature. ‘Just watch’ or ‘Just read’

  55. Menathor says:

    Hey Jamie,

    First of all, great plugin. There’s just one problem I’m having which makes it unusable for me – the fact that

    At the moment, even after entering all the default fall-back info, every post and needs to be edited and resaved for the meta tags to be added to that page.

    The second problem is, if I want to change this later (eg. the default image), I need to go into every post and edit / re-save for the change to take place.

    Is there any way to make the plugin function so that all posts and pages automatically pull the meta tags from the default settings, unless there is something entered into the overide fields on that particular page or post?

    Cheers

    • Hi Menathor,

      Currently if you save a post with a particular value as being empty, then it will read the default option value instead for the head, so if its the final version of your post/page, just set the values you want to be default all the time to be nothing, then save the post :)

      Hope this helps,
      Jamie

  56. Menathor says:

    Hi Jamie,

    Thanks for the reply! This works, however the problem is if you have a site with hundreds of posts – it’s not really practical to open them all up and save them again.

    I noticed that the plugin saves the info in postsmeta in tr SQL database (as an entry called OGP). What would be great is if the plugin assigned the default values to any post or page without an OGP entry in the database, thereby avoiding the need to open and re-save each post and page after the plugin is installed.

    Also, another suggestion is to make the plugin only save an OGP entry for a post or page when something is entered other than the default value. This way, when thr default values (eg image, video, description) need to be changed, they can just be changed in the plugin settings. Currently, every post and page needs to be edited and saved again with every change, to force the OGP entry in the database to update.

    If the default values aren’t pre-populated / saved for each individual post and instead are just taken from the plugin settings page whenever there is no OGP entry, and OGP entries are only used to override this instead of for every post, I think the plugin will be much cleaner and also be usable for larger sites.

    Last suggestion – a button in the settings page to clear all plugin data from the database (eg. for a clean uninstall, or to reset all overridden pages back to default values in one go) would really complete the package nicely.

    Just a few thoughts :)

    • Hi Menathor,

      I know its not the most practical approach, but then we were also sent requests for it to do the opposite to what your requesting :) its one of those marmite things i guess

      You have made a couple of interesting points though :) i will take them into account for the next update, where I am also planning the ability to add your own og values too!

      Thanks,
      Jamie

  57. As with all things, there is never enough time but do you have an ETA as to when this plugin will be updated? Love the plugin though. Keep up the great work!!

  58. LOVE your plug in, but my FB ID is not working right? User error? ;)

  59. The page failed to provide a valid list of administrators. It needs to specify the administrators using either a “fb:app_id” meta tag, or using a “fb:admins” meta tag to specify a comma-delimited list of Facebook users.

    This is the error on my website after I clike my own like button. I entered the long User_id number into the (Facebook Profile ID of Admins) field and left the app field blank (I am not running an app) Maybe that is the problem? Everything else works PERFECT and it was so supper easy! Thank you!!!

  60. Hi, I just started using your plugin on my website – http://www.boax.co.uk – after giving up on trying to code the same thing for hours yesterday. Wish I’d found it sooner! Everything works really well but could I add a suggestion?

    It would be great if the WordPress post’s Post Thumbnail (now called the “Featured Image” in most themes) was the default og:image value if a Featured Image has been set by the blogger. If no Featured Image has been set, the image entered in the plugin’s options panel would be the default. This would be ideal for most users I think, and I believe this is what “kkri” was asking way up at the top of these comments.

    This should be quite simple to implement with code along the lines of:

    global $post; //This is necessary
    if(!has_post_thumbnail( $post->ID )) { //if no Featured Image set
    $default_image_url = $default_image_url_from_plugin_options_panel;
    }
    else{ //if Featured Image has been set
    $default_image_url_array = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), ‘medium’ ); //second argument optional (size)
    $default_image_url = $default_image_url_array[0]
    }

    Anyway, thanks for the plugin!

  61. …and users will find this link very useful. Normally Facebook caches OG tags, but run your URL through the debug tool and it updates immediately.

    http://developers.facebook.com/tools/debug

  62. ^ Looks like some of the code I posted got messed up in the editor somehow. I got it working a little more elegantly anyway – please email me at lorne@boax.co.uk if you’d like the code for the modification.

    It also seems like you need to order the og:image tags in the reverse order you would like Facebook’s thumbnail picker to display them – this is the opposite of what online documentation says!

    Thanks again for the plugin.

  63. Hi Jamie!

    I am using version 2.2 in a wordpress 2.9.2. After installing, I noticed that the meta tags were being generated in the main site but not in individual posts. I did some research and found that the problem was that the call to get_the_id() inside OGP_output_to_head() wasn’t returning the post id.

    This is probably a problem in my installation but I wanted to warn you in case other users find the same problem.

    I fixed it by getting the postid from $wp_query->post->ID when the call to get_the_id() fails.

    Thanks for the plugin!

    • Hi Ni,

      The plugin was designed for WP 3+ so for it to work correctly you will need to update your WordPress installation, which is also a very good idea for the added security benefits also.

      thanks,
      Jamie

      • Thanks Jamie, you are right, I should upgrade right away. It’s just that I saw in the wordpress plugin page that it required 2.5 or higher and gave it a quick shot.
        Anyway it works like a charm.

        Regards

  64. Hi Jamie,

    Do you plan to add the like button in your plugin? I loved it but if conflicts with other plugins that add a like button and OG tags and if I use only your plugin, I don’t get the like button. Or am I missing something?

    Regards

    Emeric

  65. Geej Mauriva says:

    Hi Jamie,
    I’m back again with another issue. I have been using your plugin flawlessly for the last few years and have loved it. Unfortunately, either Facebook has changed its programming or something has gone awry because now the multiple images function doesn’t work. In fact when I post to FB from a page with multiple images set up in:
    Website Image
    Image Url (Comma Separate Images):
    and separate the multiple images with a comma (no space) none of the images set up here show up in my Facebook post (after clearing the FB cache with the debug tool) but when I just have one image there only that one image shows up in my FB post.
    Any ideas what I may be doing wrong or if something has changed?

    This was the scenario with WP 3.3 and then I upgraded your plugin to V3 and WP 3.5.1. and was still having the same issue.

    Thanks!

  66. First off, thanks for the plugin. Much appreciated!

    I am, however, having an error of some sort. I am getting the follwoing on all of my product pages (I am using wp-ecommerce pluging, and it shows up under advanced settings, not OGP settings on each product page):

    OGP: s:66:”a:3:{s:6:”fields”;a:0:{}s:13:”custom_fields”;a:0:{}s:3:”_v3″;i:1;}”;

    If I delete the advanced setting -> custom meta I then get the following error on each page:

    OGP: a:3:{s:6:”fields”;a:25:{s:4:”type”;a:1:{s:5:”value”;s:0:””;}s:5:”title”;a:1:{s:5:”value”;s:0:””;}s:3:”url”;a:1:{s:5:”value”;s:0:””;}s:11:”description”;a:1:{s:5:”value”;s:0:””;}s:6:”locale”;a:1:{s:5:”value”;s:0:””;}s:18:”locale-alternative”;a:1:{s:5:”value”;s:0:””;}s:14:”street-address”;a:1:{s:5:”value”;s:0:””;}s:4:”city”;a:1:{s:5:”value”;s:0:””;}s:11:”postal-code”;a:1:{s:5:”value”;s:0:””;}s:12:”country-name”;a:1:{s:5:”value”;s:0:””;}s:5:”email”;a:1:{s:5:”value”;s:0:””;}s:12:”phone_number”;a:1:{s:5:”value”;s:0:””;}s:10:”fax_number”;a:1:{s:5:”value”;s:0:””;}s:5:”image”;a:1:{s:5:”value”;s:0:””;}s:12:”image_secure”;a:1:{s:5:”value”;s:0:””;}s:5:”video”;a:1:{s:5:”value”;s:0:””;}s:12:”video_secure”;a:1:{s:5:”value”;s:0:””;}s:12:”video_height”;a:1:{s:5:”value”;s:0:””;}s:11:”video_width”;a:1:{s:5:”value”;s:0:””;}s:10:”video_type”;a:1:{s:5:”value”;s:0:””;}s:5:”audio”;a:1:{s:5:”value”;s:0:””;}s:12:”audio_secure”;a:1:{s:5:”value”;s:0:””;}s:10:”audio_type”;a:1:{s:5:”value”;s:0:””;}s:9:”fb:admins”;a:1:{s:5:”value”;s:0:””;}s:9:”fb:app_id”;a:1:{s:5:”value”;s:0:””;}}s:13:”custom_fields”;a:0:{}s:3:”_v3″;i:1;}

    Is there a way to disable OGP from specific pages. Truthfully, I only use it to make a specific image show up for my “Trackable Social Share Icons” plugin for the blog page. I only really need it for the blog page.

    Here is a link to a product on the site so you can see the error:

    http://spiritofsuccess.com/resources/product-category/each-one-reach-one/

    Any help is greatly appreciated!

    • Hi Scott,

      The outputs you are seeing are the serialized version of the options, rather than errors.

      The plugin serializes the post’s meta data to store as a custom field, and the custom field meta box shows all the fields attached to that post.

      The plugin cannot be disabled on individual posts, however left blank the default options will be used for that post.

      I hope this helps.

      Thanks
      Jamie

      • I’m getting no results with the plugin installed with optimize press theme. The only tag that is working is the site_name tag. I’ve populated the description, title, url, type, and image. Nothing is showing in the source or the debugger. Is there some sort of conflict with the template that is not allowing the plugin to work?

        Thanks,
        Amy

  67. Scott Daris says:

    Thanks for providing this plugin – it has all the options that a lot of other plugins don’t. The only problem I’m seeing so far is that the ‘og:description’ option for each post is not working. Instead, Facebook is bringing in the code from the featured image as the so-called ‘description.’ Luckily FB allows you to click in the description area (editable when it turns yellow) and manually type your text, but I don’t want to do this every time. Any ideas?

  68. The open graph tags are appearing in the body and not the header. The theme makes use of wp_head too. What could I look at to fix this?

  69. Hi there,

    I love your plugin and have been using it for a while without really actually looking into it. I realised recently that I could add a video URL in the open graph settings on each post. I tried this out by adding a YouTube video URL to the box (I am not sure if this is what I am meant to do!) and when I share it on Facebook it shows a ‘play’ button. But when I click on it just a blank area appears with no video.

    Am I using this wrong? the post I am trying to do this with is http://darkdesigngraphics.co.uk/tattoo-designs/a-guardian-angel-tattoo-design

    The video URL I added to the settings box is the same video that is embedded in the post!

    Looking forward to hearing back from you.

    Regards

    • grant@HitReach says:

      Hi Alasdair,

      Maybe try providing the direct link to the video by using a url that starts with http://www.youtube.com/v/ So your one would become http://www.youtube.com/v/ziQLo7O03O4

  70. Hi,

    I am using your Open Graph plugin for one my upcoming websites.
    My website has custom post types along with the usual posts and pages.
    I want to know if there is an option to configure the plugin to only show up on certain post types?

    Thanks,
    Arfa

    • grant@HitReach says:

      Hi Arfa,

      Unfortunately this isn’t built into the plugin and we don’t plan on adding it in the near future.

      I’ll add it to a future to do list though.

  71. Hi Grant,

    Thank you very much, that works perfectly. Now going to have to go through all my posts and start putting videos urls in! Love the plugin.

    Cheers

  72. Hi,

    Great plugin. Love the option to customise meta tags per post/page!

    However only one of the meta tags is being generated!

    After activating the plugin (and deactivating all other open graph plugins), and adding custom tag info to a page, update and refresh page, only [og: site_name] is visible in the source code.

    Why aren’t all of the other tags being populated and published?

    Been experimenting on this page
    http://www.connecttherapy.com/lp/test-lightbox/

    • Jane Wilson says:

      Hi Andrew,

      Apologies for the delayed reply. It looks like there is an error in the plugin stopping it from working properly on pages, I shall push out an update to fix it today.

      Thanks,
      Grant

  73. Hi Grant,

    Thanks very much for this. I am in the process of testing this plug-in with the All-in-One SEO.

    So far the initial test results looks good.

    One question – How do I get the plugin to automatically add the featured image URL to the Image URL aka og:image (Section: Website Image)

    Thanks in advance for your effort.

  74. Great. Thanks Grant. Will begin testing it out in the next 24 hours! Please thank Chris (if he had anything to do with this).

Add Comment Register



Leave a comment

*


7 × = fourteen

What Our Clients Say

James AgateJames Agate
Managing Director
Skyrocket SEO

Chris and his team are patient, responsive and have a sense of humour even when I asked them to change something that I'd insisted upon initially. Would definitely recommend to anyone looking for an awesome WordPress development and design team.

Richard SedleyRichard Sedley
Director
Seren

Hit Reach were really easy to deal with and provide exemplary service. They implemented exactly what we wanted and guided us when we were uncertain about the solution. A highly professional and cost effective solution – what's not to love.

Roger GreenRoger Green
Director
Best4tyres.com

Hit Reach got it absolutely right. They embraced the challenge and complexity of the site, and exceeded expectation with quick response times and great service.

Our Key Services
Menu