通过缓存的 Facebook 小部件成为 Facebook 粉丝
我在博客上使用官方粉丝盒小部件已经有一段时间了,想用加载更少内容的缓存版本的小部件替换它。
小部件(用于 WordPress)工作得很好(http://www.electriceasel.com/plugins/plugin-facebook-fan-box-cache),但是有一件事让我烦恼。
“我喜欢”按钮只是链接到 Facebook 粉丝页面,因此用户必须再次点击“成为粉丝”,这是没有意义的,因为用户会期望在第一次点击后就已经成为粉丝了。
我正在寻找的是这两个问题的解决方案:
1.)找到一种方法让用户直接成为缓存插件版本的粉丝
2.)减少小部件的所有垃圾Facebook负载。它使我的页面加载时间增加了两秒,这是不可接受的。
I've been using the official fan box widget for a while on my blog and wanted to replace it with a cached version of the widget which loads much fewer content.
The widget (for Wordpress) works pretty well (http://www.electriceasel.com/plugins/plugin-facebook-fan-box-cache) however one thing bugs me.
The "I like"-button just links to the Facebook-fanpage so the user would've to click again on "become a fan" which makes no sense since the user would expect to already be a fan after the first click.
What I'm looking for are solutions for either of these two problems:
1.) Find a way for users to become a fan with the cached plugin-version directly
2.) Reduce all the crap Facebook loads for the widget. It adds two seconds to my pages loadtime which isn't acceptable.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
作为该插件的作者,我需要说,这可能是最需要的功能。我正在研究这个问题的解决方案,但我还必须注意,该插件的目的是删除所有外部 JS 文件以加快加载速度。我正在研究一个非常小的 JS 脚本,我可以利用它来按要求工作,但还没有做到这一点。请参阅您链接到的博客文章以获取进一步更新。
As the author of the plugin, I need to say, this is probably the MOST requested feature. I'm working on a solution to this, but I also must note that the purpose of the plugin was to remove all external JS files to speed up loading. I'm looking into a very small JS script that I could utilize to get this working as requested, but haven't been able to to this point. Reference the blog post you linked to for further updates.
您可能不想缓存 facebook 代码,因为您无法知道它何时被更改/更新。此代码将加载脚本而不阻塞页面。您的“点赞”按钮可能需要 2 秒钟才会显示,但这会防止您描述的加载缓慢。
you probably don't want to cache the facebook code as you'd have no way to know when it was changed/updated. This code will load the script without blocking the page. It may take 2 seconds for your like buttons to show up but it will prevent the slow loading you describe.