Skip to content
This repository has been archived by the owner on May 29, 2020. It is now read-only.

add image to data-media for facebook share #51

Closed
buzzguy opened this issue Feb 5, 2014 · 4 comments
Closed

add image to data-media for facebook share #51

buzzguy opened this issue Feb 5, 2014 · 4 comments

Comments

@buzzguy
Copy link

buzzguy commented Feb 5, 2014

is there a way for facebook share to also grab the data-media attribute so that it posts a specific image file rather than just the page and listing all possible images? an example would be buzzfeed's sharebox (http://www.buzzfeed.com/alanwhite/extreme-underwater-freediving-in-the-arctic) if you hover over an image and click on the facebook share.

thanks!

@sapegin
Copy link
Owner

sapegin commented Feb 5, 2014

I’m not sure that it’s possible now. But probably I could do it.

@sapegin
Copy link
Owner

sapegin commented Feb 5, 2014

(There’s a link with format description for me: http://stackoverflow.com/questions/1138460/how-does-facebook-sharer-select-images)

@buzzguy
Copy link
Author

buzzguy commented Feb 5, 2014

ooh interesting, it's changing the string in the sharer.php?s
if you open this, it looks good:

http://www.facebook.com/sharer.php?s=100&p[title]=THIS IS MY TITLE&p[summary]=THIS IS MY SUMMARY&p[url]=http://www.TEST.com&&p[images][0]=http://s3-ec.buzzfed.com/static/2014-02/enhanced/webdr02/5/6/enhanced-buzz-wide-20906-1391598612-19.jpg

in the js file, how could I set the variable for data-media for the image in facebook?
popupUrl: "http://www.facebook.com/sharer.php?s=100&p[title]={title}&p[summary]={summary}&p[url]={url}&&p[images][0]={image}"

@sapegin
Copy link
Owner

sapegin commented Apr 6, 2016

I’m closing this for now. Feel free to submit a pull request if you need this.

@sapegin sapegin closed this as completed Apr 6, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants