nygardk / react-share

Social media share buttons and share counts for React
MIT License
2.6k stars 433 forks source link

BeforeOnClick not working when invalid url is provided as prop #398

Open FrancoisCoding opened 3 years ago

FrancoisCoding commented 3 years ago

Currently i have a function that runs before sharing to receive a link to provide as a url prop. This was working before but recently the beforeOnClick function simply does not run at all when the url prop is invalid.

Expected: User clicks on share. beforeOnClick is fired to receive link. Url link is updated and post is shared.

Result: User clicks on share. Error is received. Uncaught (in promise) AssertionError: [platform].url at new AssertionError

WerdienJihed commented 3 years ago

I think It's related to Facebook API, you can only use URLs that are owned., the react-share library has nothing to do with it.