LikerID
string
referrer
string
encodeURIComponent()
format (this also works as the content key)type
string
wp
for WordPress site, omit for the otherspreview
number
1
to set the button to preview mode. This stop the button from automatically calling like.co API. Useful for develop/staging environment e.g. to prevent leaking dev server's address.For testing purpose, you may usebutton.rinkeby.like.co
instead ofbutton.like.co
In case of iframe sandbox,allow-scripts
,allow-same-origin
,allow-popups
allow-popups-to-escape-sandbox
,allow-top-navigation-by-user-activation
,allow-storage-access-by-user-activation
are needed for proper register/login functionality.
<iframe>
's src (especially the referrer
param) should be updated to when the URL is changed. In case updating <iframe>
's src is not possible (e.g. for some SPA usecases), you may call postMessage()
to the <iframe>
with following payload to update the referrer
.