dimsemenov / Magnific-Popup

Light and responsive lightbox script with focus on performance.
http://dimsemenov.com/plugins/magnific-popup/
MIT License
11.39k stars 3.49k forks source link

Adding social share buttons #753

Open babyewok opened 8 years ago

babyewok commented 8 years ago

I have found the example that has Pinterest buttons, but how can we also add facebook share and tweet buttons? I know that since there is no deep linking with magento we can only tweet or share the page url, but even so, how can it be done?

I think I have got the tweet button working by replicating the method used for the pinterest button, but how can I add a facebok share button that makes use of the open graph tags in the header? So far I hav only managed to use facebook's sharer.php which ignores the open graph tags on the page - I cannot get the share button generated by facebook to work within the pop up - is there a way?

sadortun commented 8 years ago

Hi !

See https://gist.github.com/sadortun/69a9fa854bf0ca3a4891 for a deep linking sample code.

If you want to handle the open graph, you will need to generate the correct meta(s) in order to show the right preview.

Have a look https://developers.google.com/webmasters/ajax-crawling/docs/getting-started for more details

Enjoy, Sam