Allowing multiple domains for 1 Facebook App (like Tumblr) - facebook

I am trying to get my website validated with the Facebook object debugger and I'm running into the following error:
Object at URL 'http://www.example.com/latest' of type
'smallteaser:teaser' is invalid because the domain
'www.example.com' is not allowed for the specified application id
'597566643589666'.
This error makes perfect sense since I haven't allowed the example.com domain specific access to the Facebook app. But do I really have to?
What I would like to achieve is similar to how Tumblr works when a custom domain is used.
Say, for example, the website www.davidslog.com: it has the following meta tags:
<meta property="fb:app_id" content="48119224995" />
--> This is the Tumblr app ID
<meta property="og:url" content="http://www.davidslog.com/?og=1" />
--> This is a custom domain which points to a Tumblr blog
<meta property="og:type" content="tumblr-feed:tumblelog" />
--> This is a custom Tumblr object type (in namespace tumblr-feed)
And if you then compare this with, for instance, the domain theartofnotwriting.tumblr.com, which has the following metadata:
<meta property="fb:app_id" content="48119224995">
--> This is the same Tumblr app ID
<meta property="og:url" content="http://theartofnotwriting.tumblr.com/?og=1">
--> This is a different domain
<meta property="og:type" content="tumblr-feed:tumblelog">
You can clearly see that the same Tumblr app has multiple URLs and everything validates correctly.
So why is it that this Tumblr page validates correctly and mine doesn't? How can a Facebook app be configured to allow being used on multiple domains?

I ran into this same issue. I figured that Tumblr must have some sort of partnership in place with Facebook to get this special treatment ( ip whitelist? special api? ) -- so I contacted my former Partnerships Rep at Facebook to enquire.
I got to speak with a platform engineer at Facebook about this, and I was totally wrong. There is nothing special going on.
The reason why all the domains running on Tumblr are validating fine with a single app_id, is that the facebook debug tool only checks the validity of the og_tag's structure (at least when it comes to the app_id). It does not validate if the app_id is properly associated with the given domain.
You can test this by putting up a test page with the your app_id on two different domains -- they'll both validate as fine in the debug tool.
When it comes to actual Facebook API access, Tumblr does everything on their domain. When people do use Facebook buttons/etc on Tumblr, it is often through a third party proxy tool (like ShareThis) or with a non-api button embed. I couldn't find a single custom-domain running on Tumblr that used the Facebook API or app_id related buttons. If you can, I'd love to see it.
It's the not answer you want (or I want) -- but that is what is happening. Tumblr's app_id appears on all the domains, but only actually works on ".tumblr.com"; The Facebook debug tool doesn't actually validate the app_id.

How can a Facebook app be configured to allow being used on multiple
domains?
If you try to add more than one domain in the app settings, you get an error that looks like this:
example.com must be derived from one of: Site URL, Mobile Site URL,
Canvas URL, Secure Canvas URL, Page Tab URL or Secure Page Tab URL.
example.org must be derived from one of: Site URL, Mobile Site URL,
Canvas URL, Secure Canvas URL, Page Tab URL or Secure Page Tab URL.
One solution is to set the "Page Tab URL" to a fake URL on example.org like so:
example.org/myfakepage
You don’t actually have to use the page tab for anything. This just allows you to add a second domain.

How can a facebook app be configured to allow being used on multiple domains?
It can’t. Facebook apps are tied to one domain (and subdomains thereof).
Imagine what would happen otherwise – someone could add lots of (big) websites to one single app, and then f.e. embed the JS SDK on each of them, and recognize a user that is connected to that app over “half the internet” … and thereby track their (almost) every step.
Facebook of course does not want this¹ – because they want to make money of the data they collect about users and their movements through the web (they can in theory track you on every single website that uses a simple like button) – they would be stupid if they gave that same ability to every app developer.
¹ OK, that’s my own assumption.

You cannot add multiple domains, unless the domains differ only by extension or subdomain.
In the example below, cuponeados differs only by domain extension (.com vs .com.ar), so both cuponeados.com.ar and cuponeados.com are allowed:
See this answer here: Need to add multiple domains in a single Facebook Application

The way Tumbler does this is to allow sub domains under their domain using *.example.com. This will permit all the sub-domains to work with their app (like odisharkins.example.com, facebook.example.com). There are certain aspects to adding several domains: look at the Facebook Blog.
Further domains must be derived from one of: Site URL, Mobile Site URL, Canvas URL, Secure Canvas URL, Page Tab URL or Secure Page Tab URL.
odisharkins.tumbler.com would not be an issue: it would work fine!
However, harkinstech.com or odisharkins.com will not work.

Worked for me: "The trick is to specify multiple app domains and use a comma separated list of valid URL's for the website URL configuration."
https://www.sitepoint.com/community/t/single-facebook-app-with-multiple-domains/99834/4

Go to developers.facebook.com.
Click on your application and edit the settings.
Add domains to that in the following form: example.com, example.org, subdomain.example.com (no http).
Save.
That’s the only way to do it, at east for the present time. You either add domains (and subdomains) manually or you can’t proceed.

Related

Facebook Login "The application domains must match the Facebook web game URL domains.."

I am creating an application to be able to log in with facebook on my page.
The problem is the following, I add without problem the following two domains:
www.fumigadorweb.com.ar
fumigadorweb.com.ar
The issue is that my site has two active domains, the other is elfumigadorweb.com.ar, the problem is that this domain is not allowing me to add it, it informs me of the following error:
Image - error
The application domains must match the Facebook web game URL domains
(https), mobile site URL, Unity binary URL, site URL, or secure URL of
the page tab. Fix the following domains:
I tried eliminating my other two records that it takes correctly, and adding only the one of the conflict, and neither did it.
Could you tell me what is the mistake I'm making? Do you need any other information?
From already thank you very much
elfumigadorweb.com.ar is not a sub domain of your website (http://www.fumigadorweb.com.ar). your website. Valid sub domains should have *.fumigadorweb.com.ar pattern in your case. If it could be el.fumigadorweb.com.ar instead of elfumigadorweb.com.ar then you could add it.
You have to create a new facebook app for elfumigadorweb.com.ar

Facebook counter drop to 0 after moving to https

Following the instructions given by google folks, I added https support to our blog.
Nginx, behind the scene redirect everything non http to https, proxied to a ruby on rails app.
Everything seems to work quite well but facebook counters appears now buggy.
If you look the source of this page : https://milesandlove.com/argentine/le-fitz-roy
I added a lot of og meta tags :
<meta property="og:url" content="https://milesandlove.com/argentine/le-fitz-roy"/>
<link rel="canonical" href="https://milesandlove.com/argentine/le-fitz-roy"/>
And the share button :
<a class="addthis_button_facebook_like" fb:like:layout="button_count" fb:like:href="https://milesandlove.com/argentine/le-fitz-roy"></a>
Note that even if its a add_this button, it would be exactly the same result with the official facebook one.
The weird thingis since nobody like the page, it kept showing the old count . Since a new person came and like the page, it suddenly reset the counter to 0 !
Is the count definately lost ?
Why Facebook is protocol aware ?
I read that a tricky solution whould be to serve a http:// page to the facebook
crawler. Is it the only solution ?
Essentially you've changed your URL - you might have to contact Facebook in order to "migrate" your likes (if that is even possible).
It is 100% possible to serve totally different content on the same domain with different protocols just like http differs from ftp, http can differ from https. I would say that this is expected behavior.
I don't think that this is a "tricky" solution. There are many cases in which you would want a crawler to see slightly different content from a regular user in a browser. You could set this up to only respond to Facebook by using their specified IP addresses mentioned on this page.
Facebook will reset the likes count on your ages when you move to https:// and there's no way around this. I have a 301 redirect on the old URL and Facebook doesn't follow it. It will not keep the old likes and it will treat https:// domain as a separate page. Which is bs really! I don't know of a single site that serves different content on http:// and https://. So, there's no solution to this issue at this stage.

Facebook OG:Image on URL Frame

My domain is hosted with a popular domain name company, whos name I won't mention.
Then my website is hosted by a hosting provider.
Yet, for some reason the domain name company, only allows the Meta Description and Meta Keyword tag in URL Frames.
That leaves me with the following problem, I can't put the following code in the URL Frame (or Iframe):
<meta property="og:image" content="url of thumbnail"/>
This is needed for Facebook to pick up the thumbnail when being posted.
Is there any way I can achieve this without switching domain hosting?
.Htaccess maybe?
Your problem is one of many issues with using frames.
Search engines and other services (like Facebook) can’t work with your domain, as it always points to a different resource (everyone would always be lead to the home page of your site when following the link).
You could use the "real" URL of your page (i.e., of the frame), which is probably the one provided by your hosting provider.
Right click on your page, the context menu should show something like "Load this frame only". That’s the URL of your page. For images, a right click on the image and something like "Copy image URL".
You should definitely switch to a hosting/domain provider that allows you to use the full power of your domain.

How to make facebook crawl correct url on multi market, multi language site?

We have a website with multiple markets and multiple language where we use canonical to avoid duplicate content.
A geoip matching script is used to redirect users to what we guess is their market by looking at their ip.
The problems occurs when we try to add a link on facebook to the site. Facebook crawls the canonical instead of the page url and links to wrong market due to geoip redirect.
Example:
Url /nl-nl/nl/locator
canonical /nl-nl/global/locator
en = language
fi = market/country
When a new user comes to /nl-nl/global/locator, we look at the ip and try to redirect the user to the market that the ip corresponds if the market has the language connected.
So far so good.
The problem is that since the facebook crawler is seen as a new visitor coming to /nl-nl/global/locator with a different ip than the person trying to create the link they wont get the same market and link unless the language is only used in one market and the user isn't in the same country. The content is the same but the market is wrong. instead of /nl-nl/nl/locator the facebook post links to en /nl-nl/be/locator
Essentially I would like facebook to ignore the canonical and use the specified url but I'm not sure if it possible or the correct path to solve this.

Redirect to default domain in Business Catalyst

I have a Business Catalyst site that needs the following domains redirected to the default domain.
www.membersalliance.com.au/
www.membersalliance.com.au/index.aspx
The default domain is www.membersalliance.com.au
We have been told that these three pages are seen by google as separate content and we want to consolidate them to all go to the default domain.
I have spoken to adobe support and they said that:
‪
Redirecting to another page can be done, there's no issue with that. But what we're looking for here is to not have any other postfix with the domain name. When a page is set to be the starting page, there is an automatic functionality that the postfix/name of the page is removed, but that is not the case with other pages.‪So, they would still show the name of the page, even if you redirect it to the home page (starting page set for your domain).‬
So, I can redirect to www.membersalliance.com.au/home.html but is this seen by google as a separate page to www.membersalliance.com.au?
If you re-direct a page using 301 redirects (which is how BC re-directs a page if you use re-directs) Google will only see the one page, not multiple pages.
Take a look at the Google Webmaster Tools help on "canonical" URLs.
https://support.google.com/webmasters/answer/139394?hl=en
In your case, add to page head:
<link rel="canonical" href="www.membersalliance.com.au"/>
This will tell Google to treat all variants of homepage to be recorded against a single domain.