facebook share button with custom title, description, and image [duplicate]

两盒软妹~` 提交于 2019-12-03 05:50:57
  1. Use Open-Graph Meta Tags to let Facebook get the data you want when scraping the page.
  2. Facebook will not respect the parameters you pass to sharer.php instead it'll try to get the info from the page.
  3. The Like plugin is the way to go and if you really don't have a good reason to use sharer...don't use it!
  4. Check your URL against the Facebook Debbuger to better test your links.

As for as I have seen solution number 2 is not stable. I have seen many problems related to solution 2 in facebook as well as in this forum too. I have personally experienced that it is better to use meta tags with xfbml version of fb:share.

<fb:share-button type="button_count" href="http://<?php echo($_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI']);?>"></fb:share-button>
It doesn't stop working in my experience.
标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!