jorenvh / laravel-share

Optional package for Laravel to generate social share links.
MIT License
529 stars 88 forks source link

getRawLinks() function working with linkedin, twitter, whatsapp, instagram. #95

Open techibaba opened 2 years ago

techibaba commented 2 years ago

ERROR htmlspecialchars(): Argument #1 ($string) must be of type string, array given

When using the getRawLinks() function with linkedin, twitter, instagram and other it pops up with the error above, please help.

Though its working fine with facebook.

leemonCodeShaper commented 2 years ago

I am facing the same problem here. When I call this, Share::currentPage()->twitter()->getRawLinks() it returns, array:2 [▼ "facebook" => ".......dummy link" "twitter" => ".......dummy link" ] So, It return previously generated all links whenever I called getRawlinks(). Simply problem is fixed with calling array index. Share::currentPage()->twitter()->getRawLinks()['twitter']