I tried validating my urls using Facebook card debugger but it seems it's scraping home page meta data instead of the page I'm giving it.
The only error I'm getting from the debugger is: The following required properties are missing: fb:app_id. But, I don't think it's responsible for this.
To test:
URL I'm trying to fetch: https://creativeafrica.online/work/malik--mina-by-malikdouar
Home page URL (working fine): https://creativeafrica.online/
All this is working fine with Twitter validator.
On the URL you are trying to test, you have the following meta tag:
<meta property="og:url" content="https://creativeafrica.online">
This is redirecting the facebook scraper to the homepage. Update this, and it should work fine.
<meta property="og:url" content="https://creativeafrica.online/work/malik--mina-by-malikdouar">
Since recently switching a website from http to https the News section on the website "which has a Facebook "Share" button" has lost all the counts for that URL.
I have tried the following:
Add og:url tag on the HEAD section of the website <meta property="og:url" content="http://www.example.com" />
Modifying the Facebook code to count http likes
Using the Facebook Developers sharing debugger - The client put the old URL it used to be before the switch and scraped the http version but there was no change to the share counter
Use 301 Redirect on web page for HTTP to HTTPS - anybody trying to go to a http URL is redirected to the new URL on https
Any help would be greatly appreciated.
When I enter my page URL http://korydor.in.ua/reviews/1507-vzyat-na-karandash to https://developers.facebook.com/tools/debug/ I can see that Canonical URL is pointing to some random ya.ru domain.
How to get in touch with Facebook dev team to fix that ?
This page has relevant metadata information, it is not a case of the problem
meta property="og:url" content="http://korydor.in.ua/reviews/1507-vzyat-na-karandash"
Further down that same page it explains why this is happening, screenshot attached
Your site is redirecting Facebook's crawler - you need to stop redirecting the crawler if you want the metadata for that URL instead of the after-redirect URL
I have been trying to make sure my pages in my new blog are absolutely correct when it comes to integration with facebook etc. When I put my URL in the facebook linter at:
http://developers.facebook.com/tools/debug
And put: myurl.com?fbrefresh=true
It complains that there are 'More Than One OG URL Specified'. I've checked the source and there is only one og:url, I've also checked it from the bottom link on the linter page itself where there is 'Scraped Url: See exactly what our scraper sees for your URL' and again I only found one og:url.
So why is it complaining?
The two URLs that according to facebook are in my page are identical!
You have specified an OG url in two places
<!-- Facebook Opengraph -->
<meta property="og:url" content="http://www.eve.com.mt/2012/11/16/is-living-abroad-something-for-everyone/">
and
<meta property="http://ogp.me/ns#url" content="http://www.eve.com.mt/2012/11/16/is-living-abroad-something-for-everyone/">
A possible cause for this in WordPress is using having two plugins update meta data at the same time.
If you are using the Official Facebook WordPress plugin, your meta might be inserted from it.
Is there a special url for sharing to Facebook and Twitter for mobile?
Or are they the same as those from websites?
Using
<script src="http://platform.twitter.com/widgets.js" type="text/javascript"></script>
Twitter
for Twitter and
<script>
function fbs_click()
{
u='www.something';
t='title';
window.open('http://www.facebook.com/sharer/sharer.php?u='+encodeURIComponent(u)+'&t='+encodeURIComponent(t),'sharer','toolbar=0,status=0,width=626,height=436');
return false;
}
</script>
<a rel="nofollow" href="http://www.facebook.com/sharer/sharer.php?u=someurl" onclick="return fbs_click()" target="_blank" class="">Facebook</a>
for Facebook.
Your sharing implementation should be the same and should work so long as your mobile users have devices capable or rendering JavaScript. Otherwise you can use each platforms' API url to share inside a link, the only problem is the callback redirects them either to Twitter or Facebook and they'll have to manually return to your site. The links are as below:
Sharing on Facebook:
http://m.facebook.com/sharer.php?u=<urlencoded url>t=<urlencoded title>
For example:
http://m.facebook.com/sharer.php?u=http://www.google.com
Updating status on Twitter:
http://mobile.twitter.com/home?status=<urlencoded status>
A couple of notes regarding Simpleton's answer.
The http://m.facebook.com/sharer.php URL may not be what you want. The site that you provide in the u query parameter needs to have some tags in the page in order for the share
page to be at all interesting. Just try putting another URL in there other than Google to see what I mean. I was never really able to figure out what it is looking for in the page of the site in order to show anything useful in your share page. I did not see any way to provide extra information about the site you are sharing.
The t query parameter is no longer read by facebook as far as I could tell
I found that the Facebook feed dialog was a better sharing alternative (https://developers.facebook.com/docs/reference/dialogs/feed/). See the example at the bottom of that page for the information you can share. Paste that example URL in to your browser to see what it looks like. You can play around with the parameters to see what each parameter controls in the post. For example, if you don't provide the caption parameter, it seems that the base URL of the link parameter is used in it's place. To use the feed dialog approach, you need to register your app in Facebook to get an app_id that you will need to include in the feed dialog URL. You also associate your app with a web site URL, which you also use in the feed dialog URL. If you want Facebook to serve you a mobile-friendly page, append &display=touch to the end of the feed dialog URL. Lastly, you must provide redirect_uri parameter where the user will be redirected (with the post ID included as a query parameter), so you have to have something at that URL to handle the response.
Regarding the http://mobile.twitter.com/home?status URL, I learned a couple of things: first, any URL's in include in the status will not be shortened (bummer); second, if your status includes any single quotes, they will be encoded as ' (HTML entity code) but will not get decoded when your post the tweet. However, this doesn't happen if you are posting via the desktop, using the same URL. You can see what I mean by trying the following URL from both your iPhone (I was using Safari on iPhone) and then from your desktop (I was using Safari):
http://mobile.twitter.com/home?status=Wayne's%20World
Note, I do an javascript encodeURI on the status, but single quotes are not generally encodable characters by most URL/I encoders. There are some that will replace the single quote with a %27, but I tried inserting that manually and it still didn't get decoded in the status text.
I hope this information helps someone comes here looking for simple Facebook and Twitter sharing options.
Twitter - This is how I solved the tweet by url for all devices/browsers issue:
http://twitter.com/intent/tweet?text= + encodeURIComponent(tweet);
encodeURIComponent - is a built in javascript function, explained here.
The 'http://mobile.twitter.com/home?status=' is not supported, and you will get encoding issues when twitter requests a login.
Facebook - For facebook sharing I used Facebook API example
The url is ok, but you need to do some work on your server to get Facebook to really make it look decent. Facebook now uses "Open Graph", which allows you to add special tags to your web page that Facebook understands. You can define what types of media are on the page, even add your own objects with definitions you create inside your Facebook app. The link to the developer Open Graph objects page is Here.
A sample of Open Graph on a detail page might look like this:
<meta property="fb:app_id" content="YOUR FACEBOOK_APP_ID }}" />
<meta property="og:url" content="The URL that this page is on" />
<meta property="og:site_name" content="Your domain" />
<meta property="og:title" content="Title of your page" />
<meta property="og:type" content="This is very important - it is how
Facebook refers to your post. Image, video, text, etc. Even custom stuff is
possible" />
<meta property="og:image" content="image url for facebook to display on
the user's wall" />
<meta property="og:determiner" content="auto" />
<meta property="og:description" content="A description you want with this
content" />
And so on. This all goes in the <head> of the page of the actual url you are supplying to Facebook. Then Facebook will translate this into the appropriate post. In addition, you need to set up the Open Graph on your apps developer page, so that Facebook knows to look for the og: tags. It's complicated, but it does work.
Good luck!