使用 app_data 参数链接到粉丝页面会删除 app_data 参数

发布于 2024-12-01 16:39:47 字数 756 浏览 2 评论 0原文

我在 Facebook 粉丝页面的 iframe 中有一个 FB 应用程序。如果我创建一个链接到该页面的 URL,并且该 URL 包含 app_data 参数,如下所示:

https://www.facebook.com/pages/My-Page/123?sk=app_456&app_data=mydata

然后将其发布到我的 FB feed 中,FB 会删除 app_data 参数,恢复到粉丝页面的规范 URL:

https://www.facebook.com/pages/My-Page/123?sk=app_456

这不是我想要的。

我认为这是一个错误,因为应用程序的状态是粉丝页面“规范”状态的一部分,但现在:有什么方法可以解决这个问题吗?

我考虑过将书签制作到我自己的页面:

https://facebook.mysite.com/pages/My-Page/123?sk=app_456&app_data=mydata

并动态生成一个页面,其中包含相应 FB 页面中的所有 OpenGraph 标签(以使 FB 共享工作正常),并重定向到粉丝页面(以使用户转到右侧)地方) - 但这需要(a)抓取 FB 的 OpenGraph 标签或(b)以类似爬行的方式以编程方式访问 graph.facebook.com api,我不知道 FB 对此有何看法。

I have a FB app in an iframe on a Facebook fan-page. If I create a URL linking to that page, and that URL contains an app_data parameter, like this:

https://www.facebook.com/pages/My-Page/123?sk=app_456&app_data=mydata

Then post that in my FB feed, FB strips the app_data parameter, reverting to the canonical URL for the fan page:

https://www.facebook.com/pages/My-Page/123?sk=app_456

Which isn't what I want.

I would consider this a bug, as the state of the application is part of the "canonical" state of the fan page, but for now: Any way to get around this?

I have thought about making the bookmark to my own page:

https://facebook.mysite.com/pages/My-Page/123?sk=app_456&app_data=mydata

and dynamically generate a page with all the OpenGraph tags from the corresponding FB page (to make FB sharing work), and a redirect to the fan page (to get the user to the right place) - but this requires either (a) scraping FB for those OpenGraph tags or (b) accessing the graph.facebook.com api programmatically in a crawl-like fashion, and I don't know what FB thinks of that.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

又怨 2024-12-08 16:39:47

G'Day Leo,可能有点麻烦,但似乎有效。我将我的 app_data 链接到单独托管的 URL 上,并使用它重定向回 Facebook。

所以我分享的网址是: https://externaldomain.com/deeplinker.aspx?data=stuff< /a>

然后响应重定向: https://www.facebook.com/[pageurl]?sk=[app]&app_data=[data]

With [data] = stuff

G'Day Leo, might be a bit of a hack but seems to work. I link my app_data onto a separately hosted URL and redirect back to Facebook with it.

So my URL I share is: https://externaldomain.com/deeplinker.aspx?data=stuff

Then response a redirect which is: https://www.facebook.com/[pageurl]?sk=[app]&app_data=[data]

With [data] = stuff

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文