I'm using the Page plugin feature in order to generate a rendered facebook events feed for a XAML application I'm working on.
https://developers.facebook.com/docs/plugins/page-plugin
On the page, it gives you the option to put in a facebook link, and it will then render a timeline or events page in which you can grab HTML code from. I am taking the Iframe code and harvesting the URL, then having it render within a webview in XAML. The issue I am running into is that facebook won't render the page I need. This prevents me from getting the URL out of the Iframe.
Does anyone know what sort of restrictions facebook places on rendering page plugins?
Related
im trying to use the code that is generated from facebook page plugin and use in my web page.
https://developers.facebook.com/docs/plugins/page-plugin
as i add facebook page url, my page do not appear in preview.I try in this plugin with other pages and they display correctly on preview.
What might be wrong here?
I have an Angular site that uses hashbang (#!) in urls. To render these pages for crawlers and Facebook bot (who changes the #! to ?_escaped_fragment) I have server side logic to add meta-tags, open graph tags etc and render a special version of the page.
I.e: http://example.com/something/#!/a/special/url is fetched by Facebook using http://example.com/something/?_escaped_fragment_=/a/special/url and my server responds correctly.
This works great. Facebook's own open graph debug page fetches the page meta data correctly. And I am able to share the page on Facebook.
But the pages also have Facebook comments. It is added by the javascript which inserts
<div class="fb-comments fb_iframe_widget fb_iframe_widget_fluid"
data-href="http://example.com/something/#!/a/special/url"
data-numposts="5"
data-width="100%"
data-version="v2.3"
data-colorscheme="light"
</div>
The comment box is shown and all is good. I can even post comments and see them later.
BUT: When Facebook sends notifications to other users that have commented, the link displayed on Facebook has a ?_escaped_fragment_ and not a hashbang (#!) resulting in the user getting the "special" Facebook page. This is strange to me since the escaped fragment is supposed to only be used by bots, not when displayed in links.
The link on facebook notifications is on this format lsr.php?u=http%3A%2F%2Fexample.com%2Fsomething%2F%3F_escaped_fragment_%3D%a%252Fspecial%252Furl%252F17%252F&ext=......
Is there some way to avoid Facebook displaying this _escaped_fragment_ when displaying the link?
Some Background Info
As of Mar/Feb 2014, the Facebook sharer.php way of sharing content no longer accepts custom parameters. See response from a Facebook engineer.
It used to allow multiple parameters in this form:
http://www.facebook.com/sharer.php?s=100
&p[url]={url}
&p[images][0]={img}
&p[title]={title}
&p[summary]={desc}
So you could override the title, image and description that facebook would scrape from the page, but it seems these are now ignored.
Instead, Facebook now favours the opengraph tags on the page.
So why is this a problem?
This is my scenario: I have a gallery page with multitple images. I have a lightbox that loads an image when clicked, and when the lightbox is shown, I also show share icons for all the major social networks, including facebook.
The facebook sharer url is built up using the above format, so I pass in the specific image together with the image caption. These values are now ignored.
Feed Dialog To The Rescue?
The Feed dialog method of sharing is now the preferred method, and it supports passing in custom images and captions. It works perfectly in my above gallery scenario. But it has a limitation: it does not allow you to share the content on a page you manage like the sharer.php does:
So my question is...
How can I get the Feed Dialog to work like the sharer.php and give the end-user the option to share to a group, friend's timeline or a page he/she manages?
But it has a limitation: it does not allow you to share the content on a page you manage like the sharer.php does
It incorrect statement. You can post anywhere using the Feed Dialog! You can use the to parameter and give it the concerned id where you want to share the feed.
For example
PS Facebook has introduces Graph API v2 today, and introduced new Share Dialogs over Feed Dialogs. I'm not share if that's to your significance but you can have a look.
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.
I want to make a Facebook Like Button for Facebook's individual page.
For example: http://www.facebook.com/michelleobama/posts/10150938120900578
I get the code from facebook developer's page, and put on it to a my html.
My html: http://dl.dropbox.com/u/188423/like.html
But raised a error.
So, I try to check the url by URL Linter.
It say "Facebook Can't Crawl Itself. Sorry!".
Dose it possible that I want to do?
Unfortunately Facebook won't scrape OG tags from Tab Apps. However you can let Facebook scrape Canvas apps (apps on apps.facebook.com). If you want to implement multiple Like buttons inside a Tab I recommend setting up simple HTML pages that include the appropriate OG tags as well as a redirect to your Tab in either a Canvas app (this way it feels like you're never leaving "The Facebook experience") or some external location (on your web server).