jorenvh/laravel-share

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

Opened this issue · 1 comments

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.

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']