Facebook Ograph plugin reaps sporadic results - wordpress

Plugin: Facebook Open Graph, Google+ and Twitter Card Tags
Purpose: The plugin is supposed to provide ograph tags around your posted content. The options set should first point to the ograph image specified in the plugin's added image field. If not found, then the featured image. If not found then the default image (blank.gif for test purposes).
Issue: Sporadic results. Sometimes the ograph image specified appears (after several FB Debugger scrapes. Other times the default image appears.
In all test cases, the suggested image size of 1200x630 px in JPG format was specified in the plugins ograph image field.
FB Open Graph Object Debugger provides me with this:
*
The app (my app id) specified in fb:app_id meta tag is not published
yet. App attribution will be disabled when shared stories are
rendered. Please check the status in the app settings.
*
The FB App ID is specified in the plugin config. True, the FB App Id is not submitted to be published.
Would we need to publish the FB App ID? Not sure since we really aren't developing an app. If we must publish, which screens would I supply?
The domain's DNS is set up with an A record, not a CName. Some research suggests only CName will work - but no mention of that on FB documentation.
Test results:
GOOD
Military test for URL: wels(DOT)net/dev-military/heavenly-math/
BAD
Daily Dev test for URL: wels(DOT)net/dev-daily/20160608/
:) Once I get a solution, how do I get the entire site scraped if I have more than 3000 pages?
Note: Plugin author speaks another language and is inactive on his forum.
Ref.

I found the answer! The permalink structure on our site is domain/postname However, what has been entered into the permalink field (to make each post unique) was domain/post-type/date manually. Post-type is also the archive link.
Since Wordpress permalink structure is domain/postname... the postname MUST be unique. As soon as I added a prefix to the date, Facebook was able to grab the ograph.
Example:
BAD - domain/post-type/date
GOOD - domain/post-type/prefix-date
Why? Because we have multiple CPT's and they were all using date as the postname. Facebook didn't know how to resolve even though they were valid URLs.

Related

NextScripts SNAP : not using the permalink in wordpress?

This is in a way a followup of this question : Jetpack Publicize: Sharing only on Twitter for a category
I am currently working on a website in which one of the category only serves as a way to curate news on the net and then, share it on the front page and on Twitter.
The post itself is empty, I use a custom field to receive the URL from the user, grab a few things from the target website, update the permalink and save. Upon saving, SNAP publishes the post on Twitter.
My issue is that it is not using the permalink but the url of the post itself (which is absolutely empty). Having a look into the plugin's code, I saw that it was using post metas (most notably urlToUse, snap_MYURL) but couldn't determine if it was a priority issue or something else.
I also try to adjust my code to set these meta values to the url I want, to no avail.
Is there a way I could set my custom functions or the SNAP plugin so that the permalink is used ?
No answer after a week, neither here nor from SNAP's support. No problem.
The ugly patch I used :
Jetpack Publicize for all the Twitter updates
SNAP for the Facebook ones thanks to their ability of posting based on a specific category
It's bloated and I'd love to understand but, sometime, you have to ship

Unwanted URL repeating/appended in Google Analytics

I seem to have a problem with my Google Analytics.
My pages are being shown as 404 errors as the full URL address is being repeated after the foldername.
Example:
My page for cars is:
/cars/
But Google Analytics is showing this page as
/cars/www.domain.com
There are no filters set that I can see but I don't know how to resolve it.
Is this common? It is a Wordpress site.
You have a link somewhere that starts with www.example.com, but should start with http://www.example.com (or https://www.example.com).
URLs that don't start with a protocol (http://, https:// or just :// to mean "the same protocol this document was requested with") or a / are interpreted to be relative to the current document, e.g. if you are on http://www.example.org/cars/ and you link to "mercedes/", it yields http://www.example.org/cars/mercedes/. This is what happens for you, because you have an incomplete URL somewhere. Look at your document source in your browser and search for www.example.com. You will most likely find something like href="www.example.com". Find the link in your post / template that is responsible, and change it to href="http://www.example.com" or href="https://www.example.com", depending on what that host supports.
In some cases, you might find that Google Analytics is adding your domain name after every URL slug captured and it can make for some messy reporting.
For example, our homepage would return
/nichemarket.co.za
and the blog page would return
/blog/nichemarket.co.za
If your site analytics account returns a similar issue, this is not standard practice and is generally due to a misconfiguration of the view filter.
To fix this issue head over to your Google Analytics account and click the Admin tab in the right-hand menu.
Navigate to view
Select view settings
Scroll down to default page
Remove your domain name from the text box and leave it blank
Click save

How to remove the description( Powered by .....) of website from google search results

enter image description here
I have tried to rectify this by searching the powered by ... in my root directory but im unable to find it. please help me on this.
These are your meta descriptions as shown by Google on search results.
You have three things going on:
You are not waiting for Google to pick up your changes. If you Google the name of your site, you will see that MANY of the changes to your meta descriptions are picked up.
The ones you have indicated in your screenshot are tag archives. You have to specifically set those up. In SEO by Yoast, you do it by: Log into your dashboard, go to "SEO" then "Titles & Meta", then click the "Taxonomies" tab, find the "Tags" section, and set the meta descriptions there.
Your site has likely been hacked. See those links for anime? And see this screenshot (Google your domain "wadeguh.com" and see what comes up):
How to fix this?
1. Clean up your hack.
2. Set up the Tag meta descriptions in Yoast.
3. Wait for Google to crawl again.

Error when trying to share an article URL by permalink

Our CMS uses permalink, for example this one:
www.kingmagazine.se/artiklar/king-kroner/20120713/10-korthallare
When a user is trying to share this URL by pasting it into the "update status" field on their Facebook homepage, Facebook seems to try fetch a different URL to get the open graph info, as illustrated in this image:
http://i.imgur.com/NjYM9.png
The page fetched seems to be an error message from the site. The image is not relevant to the article specified but rather contained in the footer of all pages.
However the CMS also has internal URL:s, such as this one (for the same article):
www.kingmagazine.se/artiklar/?id=152539
When sharing that one on Facebook, the correct data is fetched, as illustrated here:
http://i.imgur.com/wV5q3.png
I have tried digging in our server logs to no avail - it seems like Facebook is requesting the wrong URL and not the complete permalink. I have also tried the Facebook Lint but haven't found any reason.
Has anyone got any ideas?
Sorry for the garbled links but Stackoverflow spam prevention said max 2 links and no images. :(
Just wanted to get back to this question if anyone else has the same problem, as we eventually found the solution.
The reason of the faulty information on Facebook was that the editors in the CMS had a preview function which showed the article as rendered to the visitor. These pages (as they included the site header/footer) also contained Facebook like buttons through the Facebook social plugin.
This meant that Facebook was 'pinged' of the article before it was actually published as the editor was previewing the changes. When Facebook tried to fetch the article, an error message (with an incorrect HTTP status code I might add) was returned which Facebook then cached.
Silly enough. :)

Facebook comments box plugin + dynamic url on asp?

I'm trying to put the FB comments box on the bottom of each of my products pages on my site. I have managed to do this but when set to a static url it says the same comments on every product. I deleted the url and now it kind of works but says the plugin is in compatabilty mode.
Heres whats in my products template:
My site is trickscooter.co.uk so you can see. The comments box is at the bottom of every product.
I want people to be able to ask questions on the item shown so I can answer them so all can see.
PS - It says this:
Warning: this comments plugin is operating in compatibility mode, but has no posts yet. Consider specifying an explicit 'href' as suggested in the comments plugin documentation to take advantage of all plugin features.
Thanks !
The static URL won't do for the 'href' parameter as that parameter tells Facebook which comments to show. If you always use the same URL, of course you get always the same comments. You should have a unique url per product and use that dynamically.
If you generate the href parameter dynamically, you need to be aware that you will loose comments if your page is accessible under different domains.
The best way is to configure a 'facebook domain' (e.g. 'www.foo.example') and use that to generate your href attribute for Facebook comments.
If I misunderstood you please explain your current embedding code and what you tried. If you like the answer, please mark it as 'solution'.

Resources