Grabbing images from a page for Pinterest pinit button - javascript

I am using Pinterest share button for my website. The expected behavior i want is whenever i press pin it button it shall show me all iamges on the page and give me an option to pin one from them.
Just like pin it button on http://www.dogster.com/the-scoop/minkyu-lee-adam-and-dog-nominated-for-an-oscar
However, pin it api present at http://pinterest.com/about/goodies/ needs a hardcode media url for pinning.
I am not sure how to grab this behavior from Pinterest, can anyone help me with this ?

Found it:
http://business.pinterest.com/widget-builder/#do_pin_it_button
It does give me the desired behavior. It was totally hidden from dev stuff at Pinterest

Related

How to trigger Elementor Popup based on specific url

I have a one page website with different sections and few simple popup which are triggered when user clicks on link/button on a page. I want same popup to open when user access website with a specific url example
www.example.com/#menu
www.example.com/#privacy-policy
I found setting under Elementor popup when arriving from specific URL but this option is not working for me.
I can do same using custom JavaScript unless it will not work with elementor feature.
I tried different combination of url such as https://www.example.com/#menu #menu https://example.com/#menu
its not working for any combination.
I did keep condition setting also as Entire site etc..
Just need a point as i could not find any specify article regarding this as most of the article are about how to trigger popup from link.
Set a class on the section you want.
Go to Popup triggers
Check "On scroll to element" en put the class in.
Now the pop up show op when you scroll on the section.

Can I load an iframe when user clicks on the facebook share thumbnail?

I am trying to do something like this:
A user share the url to my page which has a small javascript based lets-say-a-game.
The shared content will display a static image and a play button inside the widget/thumbnail.
When the user clicks on the play button, I want to load the page within the shared widget inside an iframe
For example: When a souncloud page is shared, it shows the music thumbnail and a play button. When I click on the play button it displays a javascript based music player inside the share widget loaded inside an iframe. To my understanding, the trick is to use a video content as a wrapper of some sort i.e swf but couldnt figure it out exactly how to do it.
Any help towards the right direction is appreciated.
Thanks in advance!
I think Facebook will not allow you to post any script. Rather you can post links and if the user clicks on that link they will be redirected and there you can implement your code..

Link the like button of my site to the FB like button

I've been trying to make my own social buttons. Everything worked fine for the sharing buttons. However, I can't have a good result with the FB like button. I created a SVG image with the thumbs up and I open a javascript popup window that shows the FB like button. It's not friendly user at all as the person has to click twice to like the content.
I'm trying to figure out a way to make my button likes directly on FB. Do you know if it is possible? I have seen sites that have their own like button like a "heart" button or something like that and once we click it makes also a like on facebook besides the site's like. Does anyone knows how to do it?
For the moment, the code is this one with the SVG image between the tags:
Thanks.

Displaying hidden images in the Pinterest Pin Preview pop-up with addThis plugin

I am currently unable to display images on the Pinterest Pin Preview screen that are hidden (with a display: none) on my page. On my page where the "Pin It" button sits there is a standard carousel, but I am looking for all images within that carousel to be shown on the Pin Preview pop-up.
I have the script include on my page as below:
<script type="text/javascript" src="http://s7.addthis.com/js/300/addthis_widget.js#username=xa-USERNAMEINHERE"></script>
<a class="addthis_button_pinterest left last" title="Pinterest"> </a>
When investigating into this issue I came across this post from 2012, which is essentially the same issue I am experiencing. However there is no follow up to it.
I have experimented with the image_container and image_include properties of addthis_config, but essentially I can't seem to find a way to show the hidden images.
Has anyone came across this problem?
I received a reply back from Pinterest Support, as follows:
Hi,
We do offer similar functionality when using our Pin It button in
"Any Image" mode. You can see the code used to generate it by going to
our Widget Builder:
http://business.pinterest.com/widget-builder/#do_pin_it_button
However, there's no way for us to automatically include hidden images.
The one additional functionality that we do offer is picking up the
image stored in the og:image tag on your page, if it exists, so if you
populate that tag with one of the hidden images, it would show up
first in the list. Hope this helps! Bill | Developer Support Engineer
So it seems that as of May 2014 this is not possible.

How do I override a JS URL override?

I've noticed that I've I'm logged in to FB, and someone has posted a link, when I hover over it my status bar (at the bottom...that's status, right?) shows the URL for the story, but if I right click and say "copy link" the link is transformed into one with FB tracking attached. So for instance someone posted a Boston Review story. The screen and the hover text both show that the URL is:
http://www.bostonreview.net/BR37.4/junot_diaz_paula_moya_drown_race.php
But if I actually click the link or right click and say "copy link address" or "copy link location" the URL is transformed to something like this (I swapped in some x's):
http://www.facebook.com/l.php?u=http%3A%2F%2Fwww.bostonreview.net%2FBR37.4%2Fjunot_diaz_paula_moya_drown_race.php&h=wAQG1wXXXXXyoIDSg_ceA9JIXoBRD_o6XXXXXA0Llo4HA
I can use the element inspector to get around it, but I'm curious about whether I can disable that in other ways.
I realize this is only marginally a programming question, since I really just want to tweak my own browser behavior, but I'm not sure where else to ask.
but I'm curious about whether I can disable that in other ways.
You could write your own user JavaScript / browser extension / bookmarklet, that goes through all the links on a page, and if their href has the right format extracts the u parameter and sets it as the new href …
You can't change links on Facebook. All links on Facebook go through their link tracking page. It's probably used by Facebook in a number of ways (user tracking, anti-virus etc). All links in Faceboo, whether through an app or posted by the user manually, will have this long URL passing through l.php.

Categories