I'm learning about the open graph and defining the meta properties on unique URLs but I ran into one issue that I don't understand.
I know that you need:
<meta property="og:type" content="simonfoodapp:recipe"/>
to define that the current page is of a recipe object within this Facebook app (which has a verb of cooking in the Open Graph settings).
My problem is, there doesn't seem to be any need to have <meta> property="og:action" within the page.
Can't you have two different actions, such as cooking and studying attributed to the object recipe? Or can you not have more than one verb describing the same noun?
Related
I'm not sure if this is new behaviour or if it didn't work at all.
So I'm using the LinkedIn Customized URL feature, you can look it up here. The URL looks like this:
https://www.linkedin.com/shareArticle?mini=true&url=http://developer.linkedin.com&title=LinkedIn%20Developer%20Network&summary=My%20favorite%20developer%20program&source=LinkedIn
Once I share the URL the provided summary is not shown in the post preview:
So I tried with other services like Youtube, Reddit etc. and all posts do not include the provided summary.
Unfortunately I can't provide you the open-graph tags I used on my site as it's running in a corporate environment and I'm not sure if I can provide these snippets as of now.
However, running linkedin's Post Inspector shows that it detects my summary without problems:
Values are in German if anyone wonders...
So my quick and fairly simple questions, which might be answered in a comment as well, are:
Did linkedin change something on their side?
Is there some other undocumented property which neither youtube nor me included in the customized URL and therefore the summary does not show up?
Is there any post from linkedin developers which note this change?
Was it like that all the time or is it just a temporary thing?
Main Problem People are Experiencing: You cannot display BOTH an image and a description. You may only use one. Indicating an OG tag for image means your description will not display. Source: Arguing with LinkedIn Support for 2 Weeks.
LinkedIn only supports one parameter in their share content now:
https://www.linkedin.com/sharing/share-offsite/?url={url}
Source: Microsoft LinkedIn Share URL Documentation.
If you want to specify title and summary, then you need the og tags, but these are things LinkedIn associates with the URL, and it doesn't populate in the message body.
Otherwise, this works for me:
https://www.linkedin.com/sharing/share-offsite/?url=http://www.wikipedia.org/
Works fine:
If you are interested in a regularly maintained GitHub project that keeps track of this so you don't have to, check it out! Social Share URLs
LinkedIn now uses the Open Graph tags to show the preview.
Below are the og:tags that must exist and their correct format:
<meta property='og:title' content='Title of the article"/>
<meta property='og:image' content='//media.example.com/ 1234567.jpg"/>
<meta property='og:description' content='Description that will show in the preview"/>
<meta property='og:url' content='//www.example.com/URL of the article" />
And the sharing url is changed to:
https://www.linkedin.com/sharing/share-offsite/?url=your_encoded_url
Please see this Making Your Website Shareable on LinkedIn
In our custom CMS we are having lots of facebook comments and shares bound to slugs generated from article titles.
Now things are getting bad and comments and/or shares bound to different title slugs are getting lost.
Every time someone changes article title in the backend ( admin ), a new parallel universe of comments/shares are created.
I could setup my own permalink using current title, but things are messed up and I would rather bind to facebook crawled cannonical url if possible.
Cannonical url is defined by
<meta property="og:url" content="#String.Format("http://www.index.hr/tema/{0}/permalink-{1}", Model.Theme.Id, Model.Article.Id)" />
I have tried to fetch comments using this cannonical permalink, but get nothing back.
If it is not possible is it somehow possible to redefine bound links at facebook?
Thank you in advance.
I have found links to this page, but it does not supply the information I need:
https://developers.facebook.com/docs/opengraph/#types
What are the possible types?
The type for an og:type property can be anything you want it to be, as long as you have an Open Graph Story set up in your application. When you are setting up your story, you will be asked to provide an action, such as "cook", "eat", "walk", etc, and an object, such as "food", "dessert", or "route". That object is incorporated into the "type" that you provide in your open graph tags.
For example, if my app, DessertTaster, had an open graph story:
{user} tasted this dessert
The verb (action) is "taste", and the object is "dessert", and the corresponding og:type tag is:
<meta property="og:type" content="desserttaster:dessert" />
If you developed an app that used one of the default stories (and this is encouraged by facebook), then you might have an og story pair that had an action news.reads with object article.
<meta property="og:type" content="article" />
In that case, no app namespace is required.
There is a link in the Facebook Developers Sharing Guide for Webmasters to the List of Types, which are:
music.song
music.album
music.playlist
music.radio_station
video.movie
video.episode
video.tv_show
video.other
article
book
profile
website
I am doing my best to understand what everything means in the Open Graph Protocol Reading the FB page on it and the OGP Page. What exactly does this mean in the world of FB and OGP:
Note that the Open Graph protocol is currently designed to support
real-life objects. If your URL is a piece of content — such as a news
article, photo, video, or similar — you should set og:type to article
(see below). Pages of type article do not have publishing rights, and
will not show up on user's profiles because they are not real world
objects
What exactly does Pages of type article do not have publishing rights, and will not show up on user's profiles I think I understand the publishing rights but what exacly does not show on the user;s profile? The user profile part is what I do not understand.
The purpose of posting responses to people's questions is the help them, not to be condescending. If you aren't going to try to be helpful, don't post.
<!-- This is what it means to set the og:type to article -->
<meta property="og:type" content="article" />
That is not "what it means" to set the og:type to article, it is merely an example of code showing the syntax for using the article type.
Clearly #Lynda is trying to understand the caveats of using article as the OG type, and for obvious reasons: the documentation does not offer a lot of best practice advice about which type to use, especially when you are adding a LIKE button to a single page of regular content (for example, an "About Us" page, or FAQs page) on a website.
The question is perfectly legitimate, if not expressed with the clarity of crystal.
If the "LIKE" (action) of a type = article web page object is not going to "show up on the user's profile", what good is the article type?
Sure, the answer is probably simple, something like "the article will show up on the user's timeline", but whatever the answer, it is not easily clear to those of us who are in the process of gaining an initial understanding of the Open Graph protocol.
#Lynda's question can really be reframed as follows: "What are the consequences of using the article type, and when should I really use it?"
Furthermore, the documentation also says:
Use article for any URL that represents transient content - such as a news article, blog post, photo, video, etc. Do not use website for this purpose. website and blog are designed to represent an entire site, an og:type tag with types website or blog should usually only appear on the root of a domain.
When trying to determine what type to use for a specific webpage that does not represent a real world object (like a movie), a page like an "About Us" page doesn't seem to qualify as "transient content", it does not represent the entire website, and it's not a blog or blog entry. So what type should be used?
I have searched high and low for a solid 24 hours and have yet to find any clarification on this beyond the two quoted pieces of developer documentation, yet it seems a simple question that content developers must face everyday now that we recognize the importance of feeding the Open Graph.
Should a web page with non-transient content that does not represent a real world object be tagged as "article", or not? The Facebook documentation essentially says no, but does not offer any obvious alternative.
And, to come back to #Lynda's question, where does a LIKED "article" web page appear on Facebook in relation to the user who did the liking? On their timeline? Anywhere else? This is also not made clear anywhere that I can find.
Sincerely,
Fritz
If for example you have a website for movies and on every movie page you include a <meta property="og:type" content="movie" /> and a Like Button then every time a user clicks con the Like Button he/she will include that movie in his/her Facebook Profile under Info/Movies.
So his/her friends will see that he liked that movie every time they review his/her profile (in addition to the message that gets posted to the wall saying "User X liked movie Y on site Z").
This is not the case with articles, only real world objects.
More information: http://developers.facebook.com/docs/opengraph/ and http://ogp.me/
P.S. Don't forget to include the other required properties og:title, og:image and og:url.
The "type" is just an Open Graph <meta> tag you set in a page's <head>:
<!DOCTYPE html>
<html>
<head>
<title>Example Page</title>
<meta property="og:title" content="Some example page" />
<!-- This is what it means to set the og:type to article -->
<meta property="og:type" content="article" />
<meta property="og:url"
content="http://example.com/canonical/url/to/this/content" />
<!-- etc -->
</head>
<body>
<!-- snip -->
</body>
</html>
Lots more reading: https://developers.facebook.com/docs/beta/opengraph/
I used the FB page linter to verify that all the meta information I'm using is correct. According to the graph url, my page id is 157797447612809, yet when I try to publish a checkin to this page, i receive the error:
(#100) Requires a valid Place Page ID
Surprisingly, there is no good information about publishing a checkin to an open graph page available anywhere on the internet. I've used every possible variation of my place page ID that I could imagine, from the URL to page id's of different pages, yet I always get this same error. Does anyone have an example on how this should be accomplished? Thanks!
Since there is absolutely no documentation by Facebook on this matter, I solved this by looking at what foursquare has done and a lot of trial and error.
When defining your open graph object within facebook, you must add a property of type GeoPoint. I called mine location. Define in the object page meta like this:
<meta property="mytestapp:location:latitude" content="37.791" />
<meta property="mytestapp:location:longitude" content="-122.395" />
Now when you debug/lint this object it register as a place, just like the foursquare HQ. You can check in and create map views for actions that include this object.
I think you'd need to add at least the location related tags e.g. og:longitude & og:latitude.
See this graph output for a page that has these og tags and checkins.
http://graph.facebook.com/149998791679075
http://foursquare.com/venue/128530
BTW: I hope you get the irony of this example 8)
I'm also not sure if you can checkin to a og:type=food page. It may have to be one of the places types e.g. landmark - see types info on the OpenGraph page. However the example above is for og:type=company so you'd need to test the different types to see.
The Geopoint object is described here:
https://developers.dev.facebook.com/docs/opengraph/complextypes/#geopoint
Example:
<meta property="your-og-app:location:latitude" content="37.416382">
<meta property="your-og-app:location:longitude" content="-122.152659">
<meta property="your-og-app:location:altitude" content="42">
I have spent too many hours on this but it doesn't seem possible. Then I came accross with this answer. I think this feature is currently open only to Foursquare. Facebook API docs doesn't have anything related to this.