dongmu5246 2015-09-14 06:09
浏览 52

如何让Facebook Like按钮显示链接而不只是在Wordpress帖子上说“Jim喜欢链接”?

In the text view of a WordPress post, I pasted this code:

<iframe src="//www.facebook.com/plugins/like.php?   href=https://thebarneyreview.com&amp;width&amp;layout=standard&amp;action=like&amp;show_faces=true&amp;share=true&amp;height=80" scrolling="no" frameborder="0" style="border:none; overflow:hidden; height:80px;" allowTransparency="true"></iframe>

When I click on the Share button, it works fine. It posts a link and preview of website you are sharing.

When I click the Like button, it just shows up in my Facebook activity log as "Jim likes a link" instead of "Jim likes thebarneyreview.com" or something that shows what I'm liking. And it doesn't show up in anybody's newsfeed. Is there something I need to change in the code or am I wrong about how the Like button should work?

  • 写回答

1条回答 默认 最新

  • duanfen9090 2015-09-18 13:38
    关注

    On scraping your url using the debugger, I can see that the Open Graph meta tags are missing from your page. It seems like you need to add these tags to alter how your story renders. e.g. if you set the og:type to article, the story will render as 'Foobar likes an article on ...'. You can look at the docs about the Open Graph meta tags here and here.

    评论

报告相同问题?

悬赏问题

  • ¥15 BP神经网络控制倒立摆
  • ¥20 要这个数学建模编程的代码 并且能完整允许出来结果 完整的过程和数据的结果
  • ¥15 html5+css和javascript有人可以帮吗?图片要怎么插入代码里面啊
  • ¥30 Unity接入微信SDK 无法开启摄像头
  • ¥20 有偿 写代码 要用特定的软件anaconda 里的jvpyter 用python3写
  • ¥20 cad图纸,chx-3六轴码垛机器人
  • ¥15 移动摄像头专网需要解vlan
  • ¥20 access多表提取相同字段数据并合并
  • ¥20 基于MSP430f5529的MPU6050驱动,求出欧拉角
  • ¥20 Java-Oj-桌布的计算