Publishing content to multiple (unknown) domains using Open Graph?

狂风中的少年 提交于 2019-12-10 17:52:25

问题


I'm working on an application that publishes content ('articles') on a variety of URLs, which are all controlled by the same WordPress installation (mapped domains, all powered by the same set of code/part of a network). All of the publishing is done through one central Facebook App.

I have no idea what the domains for these URLS are going to be, since they are controlled by our users who register domains and then configure them within their account on our service.

When I attempt to use Open Graph to publish content on one of these sites (that has a customized domain), they are rejected with the following error (error code 1611028):

Object at URL * * * * of type 'article' is invalid because the domain '* * * ' is not allowed for the specified application id ' * * *'. You can verify your configured 'App Domain' at....

Since I can't enter all of the domains into Facebook, and since they are not derived from my App URL anyway, is there any way that I can have this work? Some sort of magic OG tag I can put in the pages or something? Or is it just not possible to do what I'm trying to do?

EXAMPLE:

We control the central service (website.com) which hosts all these other sites. Normally, they are allocated something like username.website.com as their URL. The user logs into website.com and goes to their dashboard where they publish content (a blog, static pages, whatever). That content appears on their site at something like username.website.com/2012/07/04/new-content/ (it is the entirety of the content on that page.

That user may also opt to register a domain (let's say mydomain.com) and map that to their account. So now, in the example above, their content appears at mydomain.com/2012/07/04/new-content/ instead of username.website.com (and the username.website.com URL will redirect to that new, mapped-domain version).

When they publish new content, we want to be able to publish to their Wall so that their friends can see they published something new, then click through and come and see it at mydomain.com/....

The problem is that mydomain.com is one of thousands of different domains, none of which are based on the website.com URL, so we can't add them to our app. When FB tries to read the OG data from mydomain.com, it rejects it because it's not configured within our app.


回答1:


Yes, rather than having the content dynamically publish to each of the separate domains, have it published to a remote host (with a single domain). Then, distribute a plugin for each of your users to dynamically pull off the content from your remote host to display on their respective webhosts.

Good luck!



来源:https://stackoverflow.com/questions/11369499/publishing-content-to-multiple-unknown-domains-using-open-graph

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!