自动时间线动作发布
按照 Facebook 的新开放图指南,我成功地在我们基于 WordPress 的网站上实现了时间轴和“阅读文章”操作。但指南要求您单击按钮来发布操作。这可能是一个愚蠢的问题,但是我们如何让它在用户输入文章后自动发布?这是在 Facebook 批准该行动之后发生的事情吗?
推荐栏有这个功能吗?这就是它的目的吗?
Following Facebook's Guide for the new open graph, I have managed to implement Timeline and "Read Article" Action on our WordPress-based site. But the guide makes you click a button to post the action. It might be silly question, but how do we make it automatically posting once user enters the article? Is that something that's happening AFTER the action has been approved by Facebook?
Does recommendation bar do that? Is that its purpose?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
是的,推荐栏就是这样做的。您可以在自己的代码中实现类似的功能,但推荐栏支持许多开箱即用的功能,例如仅在用户向下滚动 X% 时和/或在指定的时间间隔后发送活动。
使用此标记,应在栏加载后 5 秒内跟踪操作:
Yes, the Recommendations Bar does this. You could implement something similar in your own code but the Recommendations Bar supports a bunch of things out of the box like sending the activity only once the user scrolls X% of the way down and/or after a specified time interval.
Using this markup the action should be tracked in 5 seconds after the bar has loaded:
推荐栏仍处于测试阶段,除了应用程序管理员/开发人员/测试人员之外,不适用于任何人。
只有 Facebook 批准操作后,最终用户才会收到发布的操作。如果您提供足够的说明,这通常需要一两天的时间。您需要确保用户能够从您的网站中删除他们的活动 - 这是提交操作的要求:
对于我的 WordPress 网站,我使用了一些代码,例如:
The Recommendation Bar is still in beta and won't work for anyone other than the App Administrators / Developers / Testers.
End-users will only get actions published once Facebook has approved the action. This usually takes a day or two if you provide adequate instructions. You will need to make sure users are able to remove their activity from within your site - this is a requirement for submitting a action:
For my WordPress site, I used some code like:
使用一些 JavaScript 在页面加载后发布操作:
Use some JavaScript to post the action after the page loads: