Is it possible to use the same meta tag for opengraph and schema.org

HTML+RDFa 1.1 and Microdata extend HTML5’s meta element. HTML+RDFa 1.1 (W3C Recommendation) defines: If the RDFa @property attribute is present on the meta element, neither the @name, @http-equiv, nor @charset attributes are required and the @content attribute MUST be specified. Microdata (W3C Note) defines: If a meta element has an itemprop attribute, the name, http-equiv, … Read more

Open Graph validation for HTML5

For HTML5, add this to your html element like described on ogp.me and keep your og: prefixed properties: <!doctype html> <html prefix=”og: http://ogp.me/ns#”> <head> <meta property=”og:type” content=”website” /> … For XHTML (like OP’s question), use the name attribute instead of property attribute. Facebook lint will throw a warning, but the meta value will still be … Read more

How to post on a friend’s Timeline after the February 2013 migration takes effect?

But is there a way to accomplish this other than by using open graph? Accomplish what exactly? Tagging users/friends in any kind of posts? Only possible for Open Graph stories, or photos. (But be aware, apps are not supposed to tag users in photos if the user is not actually in it, or if it’s … Read more

Get Facebook meta tags with PHP

I Was going to suggest to use get_meta_tags() but it seems to not work (for me) :s <?php $tags = get_meta_tags(‘http://www.example.com/’); echo $tags[‘og:image’]; ?> But I would rather suggest using DOMDocument anyways: <?php $sites_html = file_get_contents(‘http://example.com’); $html = new DOMDocument(); @$html->loadHTML($sites_html); $meta_og_img = null; //Get all meta tags and loop through them. foreach($html->getElementsByTagName(‘meta’) as $meta) … Read more

How to use the ‘og’ (Open Graph) meta tag for Facebook share

Use: <!– For Google –> <meta name=”description” content=”” /> <meta name=”keywords” content=”” /> <meta name=”author” content=”” /> <meta name=”copyright” content=”” /> <meta name=”application-name” content=”” /> <!– For Facebook –> <meta property=”og:title” content=”” /> <meta property=”og:type” content=”article” /> <meta property=”og:image” content=”” /> <meta property=”og:url” content=”” /> <meta property=”og:description” content=”” /> <!– For Twitter –> <meta name=”twitter:card” … Read more

Angular 4 – Update Meta tags dynamically for Facebook (Open graph)

Open Graph OG Tags must be within the sourcecode! You need to provide a static html page containing the the open graph tags like og:image og:title and og:description in the html sourcecode, since facebook, twitter and co a just scraping the plain html without rendering it through javascript. Angular dynamically updates the dom through js … Read more

Is there an API to force Facebook to scrape a page again?

Page metadata isn’t the sort of thing that should change very often, but you can manually clear the cache by going to Facebook’s Debug Tool and entering the URL you want to scrape There’s also an API for doing this, which works for any OG object: curl -X POST \ -F “id={object-url OR object-id}” \ … Read more

How can I move a URL via 301 redirect and retain the page’s Facebook likes and Open Graph information?

Short answer, you can’t. Once the object has been created on Facebook’s side its URL in Facebook’s graph is fixed – the Likes and Comments are associated with that URL and object; you need that URL to be accessible by Facebook’s crawler in order to maintain that object in the future. (note that the object … Read more

tech