Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pinterest No Image #18

Open
suture opened this issue May 26, 2015 · 5 comments
Open

Pinterest No Image #18

suture opened this issue May 26, 2015 · 5 comments

Comments

@suture
Copy link

suture commented May 26, 2015

There is no image with the Pinterest option.

Also it looks like this plugin is not being actively maintained. No updates for a few years.

@prpdesigns
Copy link

With this workaround, you need a meta property="og:image" in your page:
change
pageDesc = "";
with:
pageDesc = "", pageImg = "";

then, add after
$.each($(document).find('meta[name="description"]'),function(idx,item){ pageDesc = $(item).attr("content"); });

this
$.each($(document).find('meta[property="og:image"]'),function(idx,item){ pageImg = $(item).attr("content"); });

between
u=encodeURIComponent(pageUrl), t=encodeURIComponent(pageTitle),

add
i=encodeURIComponent(pageImg),

replace
href = href.replace('|u|',u).replace('|t|',t).replace('|d|',d).replace('|140|',t.substring(0,130));
with
href = href.replace('|u|',u).replace('|t|',t).replace('|d|',d).replace('|140|',t.substring(0,130)).replace('|i|',i);

Finally, replace
pinterest:{url:'http://pinterest.com/pin/create/button/?url=|u|&media=&description=|d|'},
with
pinterest:{url:'http://pinterest.com/pin/create/button/?url=|u|&media=|i|&description=|d|'},

@clovisdarosa
Copy link

There is no image with the Facebook Linked and Twitter options.
Can someone help me?

@clovisdarosa
Copy link

I made the changes as indicated for Pinterest and it did not work

@clovisdarosa
Copy link

The image appears on Pinterest, but not the title....

@suture
Copy link
Author

suture commented Mar 2, 2016

I switched to this system https://github.com/cshold/social-sharing-buttons

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants