Make the Facebook crawler ignore the Canonical link - facebook-opengraph

I wonder if there is a way to make the Facebook crawler ignore the canonical link on a page.
I have a situation where the canonical link points to a different URL than the one that you are actually on.
This results in that the og:image, og:url etc. that is dynamically added to the page is ignored and the information on the facebook page is completely wrong.
I have searched for an answers to this but come up short...

If I have understood your comments correctly, you may be going about this the wrong way. If you want your like button to like a url different to the page you are on, just change the href of the like button. Make sure the page at that href has the correct og tags and you shouldn't have a problem.
If this isn't what you mean, can you try to explain what you are trying to achieve, rather than what you think the problem is, as you might just be approaching it from the wrong angle.

Related

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?

Wordpress code causing 404 errors

I am receiving 404 errors (showing on Google search console)that somehow relate to Facebook.
eg http://www.beerandcroissants.com/staying-in-mykonos-myconian-k-hotel/room-at-myconian-k-hotel-mykonos/%22https:/www.facebook.com/pages/Beer-and-croissants/1423705111261254
What it seems to be doing is taking one link (eg part of the whole link above) which relates to a photo on my blog and then appending the facebook page url. So, if I take the first part of the link above
(before the facebook part starts) I get a perfectly good link through to my site. If I take the second part (where the facebook link starts) then it takes me to my FB page. Again fine.
Why are these two linking together like this as it is this that seems to be causing the 404. Is it something in my settings. It's only just started happening.
Going to facebook directly and clicking on my post links takes me to the correct part of my blog.
I am not sure how to fix this. There are no broken links attached in google for me to view either. They keep happening every day. I now have 295 crawl errors and growing.
Would appreciate any help that can be given to lead me in the right direction.
I've had this as a suggestion....but don't know where to look for this code....
I'd say it may be coming from the following code on :staying-in-mykonos-myconian-k-hotel/room-at-myconian-k-hotel-mykonos/
It's also likely this is carried through the entire site.
https://www.facebook.com/pages/Beer-and-croissants/1423705111261254">
Note the " in the URL before https://www.facebook
I suggest you go through your code looking for similar issues.
Could someone please assist me if they are able.
Greatly appreciated.
thanks
Kerri

Wordpress cookie to highlight new posts?

I have an aggregator site in wordpress, and was thinking about a way to show new post for visitors. I don't use log-ins, so would be from plain visits. My thougth was to divide new post by a line below. Not sure how though.
Any suggestion on where to start? My site: http://www.skatevids.me
this is a fairly generic/difficult to answer question for Stack Exchange. Not entirely sure if it's a good match to be honest, but maybe I can help you formulate one that would be.
So load your webpage and then right click in your browser. If you're using Chrome or Firefox, you'll want to click "Inspect Element." I'm not sure what the command is for other browsers, but hopefully you have access to Chrome or Firefox.
Okay, so once you inspect the element, you'll see what's called the DOM (Document Object Model. And if you click through that a bit, you'll see something like
I'd look into CSS child/sibling selectors (eg http://css-tricks.com/child-and-sibling-selectors/) and see if maybe there's way to highlight the most recent, say, 6 posts. It's something to look into as a possibility, any way, and if it looks promising, you might want to give it a shot and come back with a question specific to that. As it is, there's about 50+ ways I could think of accomplishing this, some more realistic than others, depending on how your theme works. I think you'll have a lot more like getting an answer that works for your website if you try to think through some ways of doing it and check back with those
If you do that, some added info on how your theme works would be useful.... is that a widgetized home page? Are you telling your theme to display those posts there, instead of something else? If so, how are you specifying that? What is the meaning of "New post"? Less than XYZ days old? Most recent ABC posts? Something else?
As of today, you can use the Highlight New Posts plugin for this.
It sets a cookie with the time of the visitor's last visit. If it returns, it'll show a "NEW" label after the title of posts that have been published after their last visit.

facebook like box duplicates faces.. or not

I tried to read everything I could in order not to disturb, but the behavior of the facebook like box plugin is wired.
I must begin with the fact that everything in my facebook page (https://www.facebook.com/pages/tennisitgr/428483287200942) is shown correctly.
When i try to produce the code for the like box plugin from http://developers.facebook.com/docs/reference/plugins/like-box/ :
if I am not logged in to facebook i can see only the stream, the
header, and the number of people who liked my page but there are NO
faces (the show faces option is checked..).
if I am logged in to facebook I can see faces but all the faces shown
are duplicate (except mine).
Maybe I have a setting wrong in my page (I checked the permissions..) because when I try to generate the plugin for another page it is shown correctly.
Any help would be appreciated.
Thank you in advance.
Nikos.

Facebook like button is liking wrong url

First off, I saw similar posts already, but they weren't exactly what I am asking.
I used the Facebook Dev to create a like button for my website, stuck the code in and the the button showed up. The only issue is that it likes the wrong url when I click the button.
I'm pretty sure the issue is that I have it set to redirect automatically from mydomain.com to the most recent post. I think this is gumming up the works with the like button and causing it to like mydomain.com/mostrecentpost instead of simply liking mydomain.com.
Is there a way to correct this issue without having to get rid of the redirect (because that isn't an option)?
Sorry if that was a little wordy, wanted to make sure I explained the issue fully.
Is there a way to correct this issue without having to get rid of the redirect (because that isn't an option)?
Either don’t redirect in those cases where the user agent header of the request points to it being Facebook’s scraper;
or set the canonical URL of http://example.com/mostrecentpost to just http://example.com/ using the appropriate Open Graph meta tag. (Although that would mean you would not be able to like a single post any more, because all of your posts would just point to your base domain as the “real” website; so the first is probably the better option.)

Resources