Facebook does not show thumbnail when a photo is shared

强颜欢笑 提交于 2019-12-08 07:48:58

问题


I am using the following code to share images on facebook but when the dialog box is shown it does not show the image and once it is uploaded facebook just shows a link to image.

<a name="share" type="button" href="https://www.facebook.com/sharer.php?u=www.example.com/myimage" target="_blank">share</a>

回答1:


Facebook doesn't support sharing of plain images, only hyperlinks can be shared. Try posting the same image's link on your profile as status. Facebook won't show you any thumbnail for it but just the link. To share a image on facebook, you have to somehow upload it -_-




回答2:


This should work like this

<a href="http://www.facebook.com/sharer.php?s=100&amp;p[title]=Our Site Title&amp;p[url]=http://us.oursite.com/default.aspx&amp;p[images][0]=http://www.history.malc.eu/globe.jpg&amp;p[summary]=Our facebook description that is used on the FB share page." target="_blank">
    Share this
</a>

EXAMPLE




回答3:


Use the Facebook debug tool to see how Facebook processes the URL you're sharing.

The Facebook scraper will look for OpenGraph meta tags. You can reference the image you want as a thumbnail with the og:image and og:image:secure_url

Alternatively, if you wanted to upload the image to Facebook so that it goes into the user's album, you should check out How-To: Use the Graph API to Upload Photos to a User's Profile

To be more clear, you should not be sharing a link directly to the image, but rather to a page which has OpenGraph meta tags, one of which should link to the image.




回答4:


From the social plugins docs the share initiates a callback from Facebook to the page you want to share. To affect what that shows you would have a page with meta tags (og:image, og:title and og:description) to affect what Facebook puts in the comment on the users timeline.

To show the image, you'd probably need a hosting 'page' that uses a thumbnail of your image in its meta data so that it appears in the users timeline correctly.

Facebook then polls this periodically. This is very similar to the like mechanism.




回答5:


Make sure you use dont click on share more than once, after that you cant see additional changed you made for next 24 hours



来源:https://stackoverflow.com/questions/17618398/facebook-does-not-show-thumbnail-when-a-photo-is-shared

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