gpt4 book ai didi

Facebook Feed Dialog API 如何包含包含# 的redirect_uri?

转载 作者:行者123 更新时间:2023-12-03 05:03:50 25 4
gpt4 key购买 nike

如何指定包含 #redirect_uri

Facebook Feed Dialog API parameters reference

redirect_uri - The URL to redirect to after a person clicks a button on the dialog. Required when using URL redirection.

当相关的 redirect_uri 是常规 URL 时,这会按预期工作,但是,当它包含 # 时,它就会停止工作。

redirect_urihttp://website.com/foo时,它会重定向到:

https://website.com/foo?post_id=100006935442054_1384656491776519#_=_

不确定尾随的 #_=_ 的用途,但它不会在此处引起任何问题。

redirect_urihttp://website.com/#foo时,它会重定向到:

https://website.com/?post_id=100006935442054_1384656491776629#_=_

因此看来,# 后面的参数要么被忽略,要么被 #_=_ 覆盖

鉴于我正在使用单页面应用程序,其路由由哈希片段驱动,这破坏了我在应用程序中深度链接的能力。

任何有关如何解决此问题的帮助/建议将不胜感激!

最佳答案

在您的应用程序中,您可以像处理哈希标签一样处理查询字符串,或者只是进行重定向。

例如,如果您的路线是 http://website.com/#foo,则使 http://website.com/?hash=foo 执行以下操作同样的事情或将 ?hash=foo 重定向到 #foo

关于Facebook Feed Dialog API 如何包含包含# 的redirect_uri?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19697692/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com