Facebook 发帖帮助,每当用户创建帖子时都会添加到 Facebook
我认为这个问题是编写漂亮的 ruby 代码的问题,让我看看你们的想法。我已经使用omniauth和fbgraph设置了所有身份验证/访问令牌内容,我似乎无法弄清楚如何在用户创建帖子时集成它。
我的应用程序围绕用户发布帖子(由“标题”和“内容”组成),我希望该帖子能够在 Facebook 或 Twitter 或两者上自动共享,具体取决于用户设置的特定身份验证。如果用户按照常规方式在没有 facebook/twitter 的情况下注册,则不会在任何地方共享。
我如何集成一种动态方式来在用户自动发帖时共享其帖子的标题和内容?我正在考虑某种类型的 after_save 到后期模型,但我无法让它正常工作。感谢您的任何帮助,非常感谢。如果我想稍后分享链接和图片,如果这是一种允许未来扩展的方法,那就太好了。
这是搜索过程中唯一一篇揭示了如何分享给两者的帖子,但我仍然很困惑:( 简单的方法在 Facebook 页面(不是个人资料而是粉丝专页)上发帖的次数
I think this question is a matter of writing nice ruby code, let me see what you guys think. I've already setup all the auth/access token stuff with omniauth and and fbgraph, what I can't seem to work out is how to integrate it when a user creates a post.
My app revolves around users making posts (made up of 'title' and 'content'), I'd like the post to be automatically shared on facebook or twitter or both, depending on the particular authentications the users has setup. And not share anywhere if the user has signed up conventionally without facebook/twitter.
How would I integrate a dynamic way to share the title and content of a user's post whenever they post automatically? I was thinking of some type of after_save to the post model but I can't get it working right. Thank you for any help is it very much appreciated.Also it would great if it was a method that allowed for furture expansion if I wanted to share links and pictures later on.
This is the only post while searching that sheds some light about sharing to both but I'm still confused :(
Easy way of posting on Facebook page (not a profile but a fanpage)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
在您的
Post
模型中具有:然后在
User
模型中具有:In your
Post
model have:Then in
User
model have: