why twitter and facebook don't redirect to amp pages? - facebook

I've done amp pages(validation ok) but twitter and facebook redirect to a usual page instead of amp. Should I somewhere turn on this option in tw and fb?

Twitter supports AMP if the pages are annotated with AMP discovery tags. This means that you will need to include a link rel="amphtml" tag. You can check the Twitter documentation on AMP here.

Related

How do I avoid Facebook adding _escaped_fragment_ to urls in Facebook comments notifications?

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?

Wordpress issue: get extra html tags appear when I paste url into facebook page

When I paste a friend's wordpress site url in a facebook comment, I see the following extra text (I've changed the url for anonymity) The home page of the wordpress blog is titled "Home"
For some reason facebook adds the extra lines in i.e. where it says "You may use these HTML tags and ... " or perhaps the wordpress generated html get incorrectly parsed/referenced in the facebook comments browser.
I have zero wordpress experience but do understand CMS concepts well. Any help on how to resolve this will be much appreciated by my friend. I can disclose the url if its really needed to resolve the issue. I decided to try posting the question with an anonymous url first, just in case this is a known, encountered-before issue.
Wondering if the facebook graph-api has anything to do with this? (FB graph-api is not my forte either as I'm more into iOS development)
Home
http://mywordpressfoo.net/
You may use these HTML tags and attributes:
<​a href="" title=""> <​abbr title=""> <​acronym title="">
<​b> <​blockquote cite=""> <​cite> <​code> <​del datetime="">
<​em> <​i> <​q cite=""> <​strike> <​strong>
It sounds like your friend's blog does not have OpenGraph tags. Facebook uses these to determine how URLs display when posted on their site (e.g. YouTube URLs display embedded videos, Flickr URLs photos, etc.).
You can find more information about the metatags that Facebook supports in their OpenGraph documentation. Your friend will probably want to make individual posts "Articles", while the homepage should be a "Blog" or a "Website".
Depending on your friend's competency with editing WordPress templates, they might find it easier to integrate Facebook's official WordPress plugin, which includes support for OpenGraph tags.

Description in google search + redirect metatag to fan page

here is my problem...
there is this domain: dbrinterativa.com
when i try to seach for 'dbr' in google, it returns this website as the first option. but the problem is that the html has a metatag redirecting the user for a facebook fanpage... and google is getting this fanpage's descriptions and title!
<meta http-equiv="refresh" content="0;url=https://www.facebook.com/dbrinterativa">
and there is another problem...
when i try to search for its url in google like dbrinterativa.com (url of example) it says that the robots.txt is not allowing google to get its meta datas... here is a link to my robots.txt
does anybody knows what can i do to solve this problem?
thanks!
Looking your robots, anyway not disallow facebook because you are using a meta refresh which is not a good practice.
So the crawler join in your website and after go to facebook, no matter what you have in your robots because not is following your robots anymore.
So I dont know why u are redirecting directly to facebook. You could do a website with a link to your FB page then you will be indexed correctly.
From the crawler of Google think that your website is the FB page, so for that is taking the title and description from your FB page and not from yours.

Post an OpenGraph action for Like and Comment without using Like and Comments plugin

I am using GraphAPI to send comments and likes to a facebook photo from my site. The problem is I want to post the action to the user's wall, one which should be viewable from their friends' news feeds like "ChrisB liked a link" and "ChrisB commented on a link", where link is the photo's url on facebook. Of course I expect the photo thumb and name and description to appear on the post as well.
I have attempted to use custom OpenGraph actions and objects for these, but og:url won't accept facebook links now (which is odd because it still works for facebook pages). The error I'm getting from the linter is "Facebook urls cannot be crawled".
Is there any way to get the result that I want?
Instead of using a Facebook URL directly, try using bit.ly links or some way of automating the redirection from your site to Facebook. For example, I would use the apache module mod_rewrite to create a page on my website, but have it redirect to Facebook.
E.g. 'fake page' would be domain.com/{photo_id}.jpg, but have mod_rewrite redirect to http://www.facebook.com/photo.php?fbid={photo_id}

How to make Facebook comment moderation work for iframe app installed as page tab

I have a Facebook App that is setup as an "App on Facebook" and a "Page Tab." I have this app installed as a tab on a Facebook business profile page.
The app is loaded as an iframe and I use the Facebook JavaScript SDK withing the iframed page to setup social widgets including comments.
My problems:
I can't access the comment moderation tools on the page -- they don't show up at the top of the comment widget.
When accessing the comment moderation tool at http://developers.facebook.com/tools/comments, I don't see any comments associated with the app.
I am an Admin of both the page and the app.
I am declaring an App ID in the <head> of the page:
<meta property="fb:app_id" content="{MY_APP_ID}">
Is there any special configuration that is needed to make this work? I have successfully setup comments with moderation before on regular web sites, so I think there must be something special about the application tab case. Should my fb:app_id reference the page's ID or the app ID of the tab?
Reason you can't moderate comments is the fact you linked Comments Social Plugin to Facebook Page URL.
Facebook linter doesn't even get to the Page Tab Canvas URL of your Application to get the values of fb:app_id and any other OG tags too.
Simply link Comments Plugin to URL accessible by linter (like your page canvas URL) pass it to linter to ensure all required tags is here, post comment and see it in moderation tool.
BTW, You will loose all existing comment due to URL change...
Update:
As you noted users may click on link comment link posted in feed they will see your app "naked", while this is true if you'll use Page Tab Canvas URL for linking Comments Social Plugin you may overcome it with next scenario:
You may link it to some special page which will only include OpenGraph tags and single javascript line redirecting to your Application tab on Facebook Page (according to URL arguments to that page for example).
<!-- OG tags should be placed here -->
<script type="text/javascript">
window.top.location = 'http://facebook.com/pages/PAGENAME/PAGEID?sk=?sk=v_APPID'
</script>
If that special page will be part of your "regular" Application (I mean within the scope of your Application Canvas URL) you may link to it's URL within Application on Facebook to avoid driving users outside of Facebook itself. Once user landed to that special page he will be redirected there real comments are displayed...
If you'll use page outside of Application Canvas URL users will get out of Facebook and only then landed to Tab.