xdamman / selection-sharer

Medium like popover menu to share on Twitter or by email any text selected on the page
MIT License
509 stars 104 forks source link

Facebook #15

Open pepaulo opened 9 years ago

pepaulo commented 9 years ago

Don't show the select text to share. Show only the URL config on fb:ID and not the select text of page.

Thank you for the great tool.

Riaan-ZA commented 9 years ago

Had the same issue. This script uses facebooks share dialgue which is only meant for sharing URL's and other opengraph posts (https://developers.facebook.com/docs/sharing/reference/share-dialog). The Feed dialogue however supports sharing text snippets, which is what we are looking for (https://developers.facebook.com/docs/sharing/reference/feed-dialog/v2.3).

I changed it to this instead (line 234):

var url = 'https://www.facebook.com/dialog/feed?' + 'app_id='+self.appId + '&display=popup'+ '&caption='+encodeURIComponent(text)+ '&link='+encodeURIComponent(self.url2share)+ '&href='+encodeURIComponent(self.url2share)+ '&redirect_uri='+encodeURIComponent(self.url2share);

This fixed it for me.

pepaulo commented 9 years ago

Thank you. This solved the problem for me too. Good job.

xdamman commented 9 years ago

@PlatinumSeed Can you submit a pull request and I'll merge it so that everyone can benefit from this change. Thanks!

Riaan-ZA commented 9 years ago

https://github.com/xdamman/selection-sharer/pull/19

dm-coding commented 8 years ago

People who have subscribed to this issue may be interested in the following relevant changes I have made to use the "description" instead of the "caption", described here in issue https://github.com/xdamman/selection-sharer/issues/31

skazhikadyadya commented 7 years ago

Have the same problem. :(