我mini_fb用来分享文字和图像到Facebook.我的要求是
我的问题是当我只共享文本时,然后将来自网址的随机图像与文本一起发布到Facebook.当我搜索它时,我发现facebook正在使用og:image标签拾取图像,然后选择最后一张图像并将其发布.
但是"og:image"我的网站中没有带有属性的显式元标记.
为了避免这种情况,我还使用属性显式元标记"og:image".但客户不需要这个.
当没有图像使用'mini_fb'宝石共享给Facebook时,我可以明确禁用图像共享到Facebook吗?
我正在使用sendgrid发送邮件.大约有20个邮件模板.
我在sendgrid应用程序"订阅跟踪"的设置中设置了取消订阅模板.
我的要求是针对不同邮件模板的取消订阅链接的不同文本.
目前,unsubscribe linksendgrid应用程序"订阅跟踪"中设置的静态只有一个.
任何人都可以帮助我如何动态设置我user_mailer班级中的取消订阅链接.
我按照此链接使用sendgrid XSMTPAPI标头在邮件中提供取消订阅链接.但我不知道如何在ruby中实现它.
下面是我在我的尝试中的代码user_mailer class.
def abuse_notification(post,current_user,eventid)
headers['X-SMTPAPI'] = '{"filters":{"subscriptiontrack":{"settings":{"enable":1,"text/html":"Unsubscribe <%Here%>","text/plain":"Unsubscribe Here: <% %>"}}}}'.to_json()
UserNotifier.smtp_settings.merge!({:user_name => "info@xxxx.example.com"})
@recipients = "test@xxx.example.com"
@from = "xxxx"
@subject = "Report Abuse Notification"
@sent_on = Time.now
@body[:user] = current_user
@body[:event] = post
end
Run Code Online (Sandbox Code Playgroud)