URL for sharing a LinkedIn post - linkedin

What is the URL structure for directly linking to a LinkedIn post. On the site itself there is no option to link to a post directly, only to share one of Twitter or Facebook. I've tried sharing a post on Twitter and copying the link from the Tweet, but that link always goes to whatever link was in the original LinkedIn post rather than to the post itself (which makes sense).
I've also tried the following link structure, which seemed to work before, but is not working anymore. Whenever I click a link like this, I get an error message saying the post doesn't exist, even though it clearly does.
https://www.linkedin.com/nhome/updates?topic=POST_ID
There is nothing in the API docs about linking to a specific post, which suggests that either the feature doesn't exist, or is not widely supported.

After digging through the object returned by the Linkedin gem when posting a share to a company page, I found the url structure. It was buried pretty deep, but it does exist.
https://www.linkedin.com/company/COMPANY_ID/comments?topic=SHARE_ID&type=U&scope=COMPANY_ID&stype=C&a=PBfw
COMPANY_ID is the id of the company page (not the name).
SHARE_ID is the id of the share/post.
Using the LinkedIn gem, you can get this link by calling JSON.parse(post.body)['updateUrl']. To get just the post id you can call JSON.parse(post.to_json)['location'][0].split('/')[-1].
I hope this helps someone out because I spent way too much time struggling with this problem.

Related

Facebook does not display my post image and can't fix it via facebook debugger

Every times I post any web page from my website on facebook, I expect its main image to be displayed for better communication rank and this is ok in the preview page, when I'm pasting the post url immediatly as you can realize it from the attached image. but when it's saved, the images goes off as you can see from another attached image.
After searching a while on google in order to know what is wrong with my web page, I realize that the page can be debugged via this tool provided by facebook, but even when I followed all the recommended step, I still face the same issue. (anyone can try it and see the result).
When continuing my research I find that there would be some issues with og:image as facebook debugger shows in the following message:
Inferred Property
The 'og:image' property should be explicitly provided, even if a value can be inferred from other tags. but the truth is that I really don't know what to do exactly to fix this.
Any help will be appreciated.

Had all relavant opengraph social meta (created by AIOS) but facebook debug failed to recognize

I know this is an old topic but I've digged dozens of related questions and solutions but neither of them works.
Some of questions I've read:
Can't fix: 'og:image' property should be explicitly provided, even if a value can be inferred from other tags
Wordpress All In One SEO plugin not sharing to Facebook wall
My test url for facebook debug:
https://trangthietbiytehcm.com
Also, I debuged via Facebook sharing debug and Facebook Object debug
Here is Facebook Object debug:
Here is Facebook Sharing debug:
here is the post's head tab:
I also add that sometimes this post could be displayed well (including image thumbnail) on my facebook page but most of time it did not.
I've cleared my wordpress caches.
Absolutely, I can read the social opengraph tab on my post but facebook failed to read them. I do not know the reason behind this problem. Please help me to be clear! thanks
EDIT:
This is a capture of the fact that sometimes Facebook receives my blog post well. And the post link is: https://trangthietbiytehcm.com/uncategorized/san-pham-test-lan-2/
And I wnat to add that the above test link (https://trangthietbiytehcm.com/uncategorized/bai-viet-mau/) also has the same fact as this
EDIT (UPDATE):
After months of be frustrated with this problem, I even tested on another new web on new host server. I've finally found that the reason of this problem is the page cache function of the W3 total cache
We've found this issue to be related to W3 Total Cache, too. Specifically, it's the Wordpress Dashboard > Performance > Minify > Eliminate render-blocking CSS by moving it to HTTP body feature. What this does is shove all the CSS right after the tag, moving all the other header tags down.
And it seems Facebook (and Twitter?) only parse a fixed amount of the page before deciding to try and render... and if your CSS is long, well, it never sees your og:image tag (or any others, like Title, etc).
We have yet to find a good fix which still allows this feature to be used.

Facebook shares not using og:url when clicked in Facebook?

One of the purposes of og:url -- I thought -- was that it was a way you could make sure sessions variables, or any other personal information that might find its way into a URL, would not be passed along by sharing in places like Facebook. According to the best practices on Facebook's developer pages: "URL
A URL with no session id or extraneous parameters. All shares on Facebook will use this as the identifying URL for this article."
(under good examples: developers.facebook.com/docs/sharing/best-practices)
This does NOT appear to be working, and I am puzzled as to either -- how I misunderstood, and/or what I have wrong in my code. Here's an example:
https://vault.sierraclub.org/fb/test.html?name=adrian
When I drop things into the debugger, it seems to be working fine...
https://developers.facebook.com/tools/debug/sharing/?q=https%3A%2F%2Fvault.sierraclub.org%2Ffb%2Ftest.html%3Fname%3Dadrian
og:url reads as expected (without name=adrian).
But if I share this on facebook -- and then click the link. The URL goes to the one with name=adrian in it, not the og:url.
Am I doing something incorrectly here, or have I misunderstood? If the latter, how does one keep things like sessions variables out of shares?
Thanks for any insight.
UPDATE
Facebook replied to a bug report on this, and I learned that I indeed was reading the documentation incorrectly
developers.facebook.com/bugs/178234669405574/
The question then remains -- is there any other method to keeping sessions variables/authentication tokens out of shares?

LinkedIn Not utilizing og:image

I've got a site that has multiple share buttons on entries in a WordPress site.
We designed this so there are no individual entries to view, they're Podcasts and videos. The listing page has a minimum of 10 entries, each with share buttons.
Currently the share links and titles are working correctly. But the page is not recognizing the og:image, and instead is picking up the default logo for the site itself.
I read another post on Stack Overflow that said it might be an issue for LinkedIn if the image is utilizing SSL for the link. But I just find that hard to believe.
The other issue I'm struggling with, the docs say once an image is scraped it stays cached for approximately 7 days.
I had an issue with FaceBook and there's a debugger that allows you to rescrape the page which let's me verify my changes worked.
My two questions are, is there something other than the og:image i should be specifying? since I can't specify it per post, it's in the head of the page itself, i would think it would pick that up. No?
Second, is there a way a developer can re-check after the meta info has been changed to see if the changes worked, without having to wait the TTL on the cache?
try this:
url/link?blah=1
url/link?blah=2
url/link?blah=3
to get around the cache.
This should trick it into thinking its a new page each time.
Can i get a link to test?
Anthony Walz posted the correct answer. Through email he also helped another problem i had which corrected a new issue i didn't realize I had until i looked.
my LinkedIn shares were not picking up the show title, they were picking up the page description instead (i have several podcasts showing on one page, we don't use individual post pages, they all play from the listing.)
he pointed me to the developer docs on formatting sharing links
Which gives a real world example - here:
https://www.linkedin.com/shareArticle?mini=true&url=http://developer.linkedin.com&title=LinkedIn%20Developer%20Network
&summary=My%20favorite%20developer%20program&source=LinkedIn
Thanks a ton for assist Anthony!

Cannot change og_type

I just replaced a tumblr website for a client with a brand new Wordpress site. And when running it through the Facebook debugger, I get this error:
The object at 'http://example.com/' previously had type 'tumblr-feed:tumblelog' and cannot be changed to an object of type 'website' to avoid data corruption of existing actions.
I Googled "Cannot change og_type" (in quotes) and got literally zero results (well now it seems there are results stemming from this question). Am I really doomed to Facebook data mismatch?
Per the error message
... cannot be changed to an object of type 'website' to avoid data corruption of existing actions.
If the og:type were changed for a URL, any existing user posts linking to it or sharing it, any Open Graph actions referencing it, as well as any likes of the URL would become broken and the user's profiles would be missing content they'd posted before.
I don't believe there's any way around this, as it's an intentional restriction to avoid breaking existing posts, likes, actions, etc referencing a URL. If the posts were broken, content would be removed from or mangled on the user's timeline.
A possible workaround if you want to have a 'new' object at that URL is to use my instructions in this answer about moving URLs to put a Like button on the URL you're trying to change (let's call it A), but pointing to a slightly different, new URL (let's call it B) , and then use the redirect mechanism in my answer to bounce users landing at URL B back to A, but serve the metdata describing 'A' on URL B if the Facebook crawler accesses it
Does the client's site have more than 10,000 likes? If so, Facebook doesn't allow og:type to be changed.
You can update the attributes of your page by updating your page's tags. Note that og:title and og:type are only editable initially - after your page receives 50 likes the title becomes fixed, and after your page receives 10,000 likes the type becomes fixed. These properties are fixed to avoid surprising users who have liked the page already. Changing the title or type tags after these limits are reached does nothing, your page retains the original title and type.
Here's the link to the Open Graph documentation. :)
I would reccomend using the Open Graph Debugger to check what facebook really sees and if facebook eventually has a cached version of your site. (you find hte debugger here: https://developers.facebook.com/tools/debug)
NOte that it doesnt say og:type - it says og_type
This is hitting me too since my og:type is set to "shamrockirishbar:shamrockirishbar" BUT the linter is saying og_type (of which there is none in my meta data) is set to "website".
enter link description here

Resources