Example Repository: https://github.com/flayyer/integration-examples/tree/main/examples/rails
We're going to use flayyer/flayyer-ruby to format FlayyerAI URLs and kpumuk/meta-tags to render them into the
<head /> of your views. Signed URLs are made with jwt/ruby-jwt explained in the Advanced usage section.
Add to your Gemfile:
And then execute:
before_action to provide the smart image URL to every view.
display_meta_tags to your layout.
If you inspect the
<head /> of your HTML you should see the
twitter:image tags with
flayyer.ai URLs with your
project-slug and current
pathname on it. If you're having trouble, please make sure they are not overwritten elsewhere.
Now you're able to manage your link previews from your dashboard, create content from templates while preserving your brand style and export it as social media formats.
flayyer gem supports HMAC and JWT signatures.
secret key in your dashboard > your project > Advanced settings > Signed URLS, and enable the signing strategy you desire.