简体   繁体   English

如何在Facebook中共享特定的URL

[英]how to share particular url in facebook

i have created some pages, which have multiple images. 我创建了一些页面,其中包含多个图像。 now i want to share those pages on facebook, which shows url with image please give me some idea. 现在我想在Facebook上共享这些页面,其中显示带有图像的url,请给我一些想法。

I tried with facebook sharer.php 我尝试了Facebook sharer.php

but it is not working 但它不起作用

Facebook automatically detects images from your page, when you share it and displays them in the timeline. 共享时,Facebook会自动从您的页面中检测图像,并将其显示在时间轴中。 But there's a way to use particular image, when sharing links: 但是当共享链接时,有一种使用特定图像的方法:

<meta property="og:title" content="YOUR_TITLE_HERE">
<meta property="og:description" content="YOUR_CONTENT_HERE">
<meta property="og:image" content="PATH_TO_IMAGE">
<meta property="og:image:type" content="image/jpg">
<meta property="og:image:width" content="YOUR_IMAGE_WIDTH">
<meta property="og:image:height" content="YOUR_IMAGE_HEIGHT">

The path to the image must be absolute AND jpg. 图像的路径必须是绝对AND jpg。 Like " http://yourwebsite.com/image.jpg ". 就像“ http://yourwebsite.com/image.jpg ”。 Width and height values must be without "px" at the end. 宽度和高度值的末尾必须没有“ px”。

You can use Open Graph Debugger in Facebook to test your links: https://developers.facebook.com/tools/debug/ 您可以在Facebook中使用Open Graph Debugger来测试您的链接: https : //developers.facebook.com/tools/debug/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM