使用Open Graph将内容发布到多个(未知)域? [英] Publishing content to multiple (unknown) domains using Open Graph?

查看:64
本文介绍了使用Open Graph将内容发布到多个(未知)域?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发一个应用程序,该应用程序在各种URL上发布内容(文章"),这些URL均由同一WordPress安装(映射的域,均由同一组代码/网络的一部分提供支持)控制).所有发布都通过一个中央Facebook App完成.

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.

我不知道这些URL的域是什么,因为它们是由我们的用户控制的,这些用户注册域,然后在我们的服务帐户中对其进行配置.

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.

当我尝试使用Open Graph在其中一个站点(具有自定义域)上发布内容时,它们被拒绝,并出现以下错误(错误代码1611028):

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):

URL"**"的"article"类型的对象无效,因为该域 指定的应用程序ID' * * *'不允许使用'* * * '.你 可以在以下位置验证您配置的应用程序域".

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

由于我无法将所有域都输入到Facebook中,并且由于它们都不是从我的应用程序URL派生的,因此有什么办法可以使我从事这项工作?我可以在页面中放置某种神奇的OG标签吗?还是不可能做我想做的事?

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?

示例:

我们控制着托管所有其他网站的中央服务(website.com).通常,会为他们分配诸如username.website.com之类的内容作为其URL.用户登录website.com并转到其发布内容(博客,静态页面等)的仪表板.该内容出现在他们的网站上,名称为username.website.com/2012/07/04/new-content/(这是该页面上内容的全部.

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.

该用户还可以选择注册域(例如mydomain.com)并将其映射到他们的帐户.因此,现在,在上面的示例中,其内容显示在mydomain.com/2012/07/04/new-content/而不是username.website.com上(并且username.website.com URL将重定向到该新的,已映射的域版本).

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

当他们发布新内容时,我们希望能够发布到他们的Wall,以便他们的朋友可以看到他们发布了新内容,然后单击并进入mydomain.com/....

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

问题在于mydomain.com是数千个不同的域之一,它们都不基于website.com URL,因此我们无法将它们添加到我们的应用中. FB尝试从mydomain.com读取OG数据时,由于未在我们的应用程序中进行配置,因此拒绝了该数据.

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.

推荐答案

是的,不是将内容动态发布到每个单独的域,而是将其发布到远程主机(具有单个域).然后,为每个用户分发一个插件,以动态地从远程主机上提取内容,以显示在各自的Web主机上.

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.

祝你好运!

这篇关于使用Open Graph将内容发布到多个(未知)域?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆