Allowing multiple domains for 1 Facebook App (like Tumblr)

后端 未结 7 791
生来不讨喜
生来不讨喜 2020-12-02 23:14

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.exampl

相关标签:
7条回答
  • 2020-12-02 23:17

    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:

    enter image description here

    See this answer here: Need to add multiple domains in a single Facebook Application

    0 讨论(0)
  • 2020-12-02 23:18

    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.

    0 讨论(0)
  • 2020-12-02 23:22

    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.

    0 讨论(0)
  • 2020-12-02 23:28

    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.

    0 讨论(0)
  • 2020-12-02 23:33

    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.

    0 讨论(0)
  • 2020-12-02 23:39

    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

    0 讨论(0)
提交回复
热议问题