简体   繁体   English

点赞按钮并在Facebook上发布正确的照片

[英]Like buttons and posting the correct photo on Facebook

I have an online bachelor catalog and I want people to Like a bachelor and have it appear on their FB feed. 我有一个在线单身汉目录,我希望人们喜欢单身汉并将其显示在他们的FB feed中。 http://gothamrfc.org/drupal/?q=2012catalog http://gothamrfc.org/drupal/?q=2012目录

I set up the Like button using the Social Plugins feature on FB. 我使用FB上的“社交插件”功能设置了“赞”按钮。 All bachelors are on the same page and they have anchors http://gothamrfc.org/drupal/?q=2012catalog#waldmann and the Like button refers to each anchor. 所有单身汉都在同一页面上,并且具有锚点http://gothamrfc.org/drupal/?q=2012catalog#waldmann,并且“赞”按钮引用每个锚点。

My problem is when the user clicks on Like, it posts the same picture of one bachelor, not of the one that they liked. 我的问题是,当用户单击“赞”时,它发布的是一个单身汉的相同图片,而不是他们喜欢的那个。 I didn't see anything in my js file. 我的js文件中什么也没看到。 I also added the og button but that didn't work. 我还添加了og按钮,但是没有用。 How do I adjust the code so Like button corresponds to the correct photo? 如何调整代码,使“喜欢”按钮对应正确的照片? I'm sure it's something simple. 我敢肯定这很简单。 Thank you for your assistance. 谢谢您的帮助。

Im having the same issue really... My current solution is to hard-code the URL of the image in the like button ref code. 林真的有同样的问题。。。我当前的解决方案是用类似按钮的引用代码对图像的URL进行硬编码。 The only issue with this is that it will show that image ONLY, on a blank page when someone clicks the liked image on a user's facebook page. 唯一的问题是,当有人在用户的Facebook页面上单击喜欢的图像时,它将仅在空白页面上显示该图像。

I'm still looking for answers since the only alternative I've found is to create individual pages for each image (each blog post, in my case) and link to THOSE pages. 我仍在寻找答案,因为我发现的唯一选择是为每个图像创建单独的页面(在我的情况下,每个博客文章)并链接到THOSE页面。 Not ideal and much more work than I'd like. 不理想,还有比我想要的更多的工作。

have a look at my blog page on my website to see what I mean: MarinePix Blog 看看我网站上的博客页面,了解我的意思: MarinePix博客

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

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