Using Addthis share in iFrame but using Parent URL - share

How can I get the parent URL for Addthis Share widget? When the Addthis code is inside an iFrame.
At the moment when I click share it gets the iFrame URL not the parent URL.

I'm not aware of a way to programmatically obtain the parent URL, but you can manually set the URL to be shared by adding the data-url attribute to the AddThis code (or addthis:url if using legacy (pre-dashboard) sharing buttons).
http://www.addthis.com/academy/setting-the-url-title-to-share/

Related

How to prevent AddThis from modifying the URL?

We are using AddThis in our website for sharing to Facebook, Twitter etc.
The url we are sharing to Facebook looks like this:
http://example.com/shop/products/booklet-10-pack#.VsLsXM8od2Q.facebook
When above link in Facebook is clicked, page initially loads above url and then the url is getting changed to the below:
http://example.com/shop/products/.VsLsXM8od2Q.facebook
Is this expected behavior?
How can we prevent this without turning off Click Tracking (in AddThis) ?
According to this url: url cleaning, if you set
clean: false
inside of url-transforms, then the original should be stored/shown

How to open facebook page inside iframe

I want to open Facebook page inside iframe but does not render page when I try to just include IFrame with src pointing to Facebook.com. Right now I am opening it inside a window but want to open it inside a frame.
Is there any way to open Facebook page in IFrame?
Facebook, as most serious sites explicitly disallow this in order to prevent clickjacking.
One of the ways Facebook do this is by sending the 'X-frame-options:deny' header, which instructs your browser to not display the page inside an iframe.
Are you talking about a facebook page within your own website?
If so;
<iframe src="http://www.facebook.com"></iframe>
If not could you provide more information.
Update
See below comment. It seems Facebook blocks it's pages from being includes in iframes.

How to Link FB Share button to URL inside Application?

I have multiple share buttons inside my application. When i click them it shares the link of the iframe for example:
www.mypage.com/?whatever=whatelse
But i need to share this link with the facebook page "around" so the link is in he facebook iframe inside my apllication:
www.facebook.com/mypage/app_123456789/?????????????????
Is it possible to set some parameters to deeplink inside my application for sharing ?
Right now i just share the index page of my application without any parameters or a specific url inside.
You'd have to use the signed_request variable to store the the page you wanted to share. From what I remember there is an app_data field in this that allows you to store custom values - https://developers.facebook.com/docs/authentication/signed_request/
You'd then have to extract the custom variable from the signed_request->app_data when the page is requested to determine which content to load. You could then obviously share the link to the fb page with the signed_request tacked on. It is still requesting just one page, but kinda simulates deep-linking.

Sharing a video to Facebook with OG tags via an iFrame embed

I am trying to find out if it is possible to set the OG tags, Flash/HTML5 player embed code and share button in one page. Then embed this in another page via an iFrame embed and then when the Facebook share button is selected via the iFrame it shares all the OG tags but rather than the player page URL it links back to the parent pages URL.
Is it possible to do this without having to add any tags to the parent page so they are all contained in the iFrame page?
Many thanks for any help!
There is a og:url tag in Open Graph Tags.
If you know the parent page URL of the embedded content, you can set og:url parameter with the parent page URL.
Then, it behaves like the way you share the parent page.

Get parent page html content from facebook iframe?

Here I am working with facebook application.
I have create page which are working in facebook iframe window.
I want to access main(Parent) window html source from iframe which create by me.
Here I have tried for
parent.document and window.top.document and window.parent
all three are not working in my case. If you have any other idea then let me know,
Thanks
You can't access content outside of your IFrame.
Otherwise you could change content outside of it and modify Facebook,
just because your IFrame is loaded inside of Facebook ;)