20

Message alert in Facebook developer page that my site is currently using the following deprecated features:

Social Plugins (Like Button, Like Box) without absolute URL's in their href parameter. This must be fixed before July 2013.

I'm guessing it's talking about the data-href parameter for likes, but my like buttons are being generated with the following simple code:

data-href="http://<?php echo $_SERVER["HTTP_HOST"].$_SERVER["REQUEST_URI"];?>"

And the results when viewed in the browser (looking at the HTML source) certainly look like absolute URLs to me. What is this alert actually trying to tell me? That they've scanned the site and that there are actual HREFs that have problems, or just that there might be some?

Is it referring to some other HREF parameter?

CarloTex
  • 315
  • 2
  • 7
  • 2
    You can simply enable the July migrations and see if anything breaks if you are sure about it. – phwd Apr 29 '13 at 01:47
  • 2
    The `href` parameter is a part of the like button https://developers.facebook.com/docs/reference/plugins/like/ and other social plugins . The parameter is listed in the current docs as `href` not `data-href` , did that change or are you referring to a different parameter? I also had the same warning , double checked the code , and have enabled the changes to no ill effects. – here Apr 30 '13 at 23:13
  • 1
    Thanks for pointing out that the docs says href, not data-href. Strangely, if you use the little form they have that generates a like button, and click "Get Code" it generates code such as: `
    `
    – CarloTex May 02 '13 at 01:44
  • What about using the og:url meta tag? Does the like button then still need the data-href attribute? – tvgemert May 07 '13 at 09:32
  • Basically FB will throw this warning whether it is accurate or not. If you are sure about it, you can do as others have suggested and enable the migrations or you can just ignore the error. :) – Aron May 13 '13 at 12:01
  • I'm assuming that this still means that the `href` value is optional, but if supplied has to be absolute? The wording really isn't very clear in the Facebook documentation. – wolfyuk May 14 '13 at 10:35
  • @CarloTex could you select correct (if exists) answer on your question? – Victor Perov Apr 07 '16 at 15:00
  • I thought I had already marked it as the answer, but I had just marked it as useful. – CarloTex Apr 11 '16 at 14:21

3 Answers3

6

If you use absolute url in data-href attribute of this social plugin, just enable July 2013 Breaking Changes in settings of your facebook application.

Victor Perov
  • 1,697
  • 18
  • 37
  • Please provide link/s OR steps about how one can enable "July 2013 Breaking Changes" – Sujit Singh Jun 06 '13 at 04:52
  • open developer page: https://developers.facebook.com/apps/__appId__/advanced?ref=nav where __appId__ - is your app id and set radiobutton to enabled in block **migration** on "... Changes element" – Victor Perov Sep 18 '13 at 10:29
1

In Like Button code, data-href is href for HTML5.

Heungsub Lee
  • 188
  • 1
  • 7
  • I'm pretty sure the data-href is right for HTML5, but the documentation is confusing for new users. – CarloTex May 03 '13 at 13:48
0

Absolute URL:

http://stackoverflow.com/questions/16270043/alert-says-using-deprecated-href-without-absolute-url

Relative URL

../questions/16270043/alert-says-using-deprecated-href-without-absolute-url

Social Plugins must have absolute URL your site and looks like your site has.

Greg Betr
  • 21
  • 3
  • I've been a developer for a while and knew the difference between the 2, but couldn't figure out the issue. If anyone here is using addthis, make sure the "addthis:url" is absolute based on Greg's answer. Solved it for me, thanks man! – DemitryT Aug 02 '13 at 18:49