Alert says using deprecated HREF without absolute

2019-03-23 03:12发布

问题:

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?

回答1:

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.



回答2:

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



回答3:

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.