Closed saleh-old closed 7 years ago
Hello.
getProvider
has been removed in order to simplify the api and avoid case issues with the provider name. But you can use this:
$twitter = $info->getProviders()['twittercards'];
$embed = $twitter->bag->get('player');
I tried this and now I get:
Cannot access protected property Embed\Providers\TwitterCards::$bag
Sorry, the correct code:
$twitter->getBag()->get('player');
thanks man. One more question, has there been any validations for the inputs? or should I do them on my side?
The data returned is the received from the webpage, there's no validation.
Any idea how I can use the same validations that laravel uses on Reqeust $request
?
You to prevent injections cuz I am saving the data on the database.
Database injection is something that you should prevent in your database query, not here. This library just fetch the data from the webpage and returns it. Anyway, I'm open to ideas of how improve its security.
Hi
I used to(version 2) get the Embed URL (not code) using this code that was suggested by yourself:
But after upgrading to version 3 I get this exception error:
Call to undefined method Embed\Adapters\Youtube::getProvider()
Any idea what should I do? thanks.
BTW, in case you're wondering what I'm trying to achieve here, this is an example. I want to get
https://www.youtube.com/embed/BcDZS7iYNsA
for the urlhttp://youtube.com/watch?v=BcDZS7iYNsA#t=437