Closed squareclouds closed 1 year ago
@tristantbg thank you for checking the instagram bug. now that everything works (even tiktok and soundcloud and spotify! everything i need!) i would love to store the field from the frontend, but again, my above problem persists.
do you have any idea on how i could do it? i am a designer with ok coding knowledge, so this is a bit too complex for me, i think.
but..
i saw you have the route
'kirby-embed/get-data'
in your api. can i call it from the frontend using a user that has no panel access? my frontend users have only frontend access
PS: for the time being i am using a workaround. i created my own regular route (not api route) and copied your route code :) i tested it very quickly but i get a response for the media array
@sylvainjule i ran into this feature request as well when trying to migrate a regular url to your embed plugin. being able to request the sync data manually would really be helpful.
Hi @bnomei and @squareclouds,
I added a new site method called getEmbedData() :
$site->getEmbedData($url);
@squareclouds thanks so much! :)
excellent, works like a charm!
I am trying to use the field from the frontend, but I have the feeling this will not work? it appears that even if i set the
input
varibale somehow (right now i am doing it by hand before i update my forms) the plugin wont work unlessmedia: [ ]
is also populated? which would mean to code the plugin again for the frontend, if i understand correctly?is there a way aorund this? could I save the URL via frontend form and then with some hook make the plugin retrieve all the info that it needs?