Alert says using deprecated HREF without absolute URL

自古美人都是妖i 提交于 2019-12-04 16:39:48

问题


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.



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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!