This module is agnostic to any Ruby framework.
Add this line to your application's Gemfile:
And then execute:
Or install it yourself as:
gem install flyyer
Now you can format Flyyer CDN URLs like shown below.
require 'flyyer' flyyer = Flyyer::Flyyer.create do |f| # Your project identifier f.project = 'your-project-identifier' # The current pathname of your website, try to set it dynamically f.path = '/path/to/product'end # Use this image URL in your <head/> tagsurl = flyyer.href# > https://cdn.flyyer.io/v2/your-project-identifier/_/__v=1596906866/path/to/product
Take a look into the Ruby on Rails integration guide to see a full example for your specific setup. You're invited to contribute to the Ruby documentation and add your own guide for other technologies.
The meta-tags code needs to be static, processed at build time or server-side rendered for link previews to work.
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.
flyyer supports HMAC and JWT signatures.
secret key here under Signed URLS, and enable the signing strategy you desire.
from flyyer import Flyyer flyyer = Flyyer( project="website-com", path="/path/to/product", secret="your-secret-key", strategy="JWT", # or "HMAC") # Use this image in your <head/> tagsurl = flyyer.href()# > https://cdn.flyyer.io/v2/website-com/jwt-eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJwYXJhbXMiOnsiX19pZCI6ImplYW5zLTEyMyJ9LCJwYXRoIjoiXC9wYXRoXC90b1wvcHJvZHVjdCJ9.X8Vs5SGEA1-3M6bH-h24jhQnbwH95V_G0f-gPhTBTzE?__v=1618283086