好友对话确认后出现500错误
使用好友对话框,好友请求按预期工作,但是当目标已经发出好友请求时使用同一对话框时,系统会要求用户“确认”这是预期的行为。然而,在我点击确认按钮后,我收到了 500 错误。
我非常确定我的 redirect_url 是正确的,因为,1. 当向尚未发出好友请求的用户发出好友请求时,它会起作用,2. 当我将其更改为无效请求时,它会起作用失败并显示相应的消息,说明该redirect_uri不属于show_error参数为true的情况。 我提供了所有必需的参数 app_id 和 id。
https://www.facebook.com/dialog/friends?redirect_uri=<url encoded redirect uri>&id=<target user id>&app_id=<my app id>
我已经花了一天时间尝试自己调试这个,任何帮助将不胜感激。
Using the friend dialog, friend request works as expected, but when using the same dialog when the target already maid a friend request, the user is asked to "confirm" which is the expected behavior. However after I hit the confirm button I get a 500 error.
I am pretty sure that my redirect_url is correct because, 1. it works when issuing a friend request to an user that didn't already make one, 2. when I change it to an invalid one, it fail with the appropriate message saying the redirect_uri is not owned with show_error param to true.
I provide all the required parameters app_id and id.
https://www.facebook.com/dialog/friends?redirect_uri=<url encoded redirect uri>&id=<target user id>&app_id=<my app id>
I spent a day already trying to debug this by myself, any help would be appreciated.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
还要确保多个元标记不会发送到 Facebook。
例如,如果您的页面已经将 Fb 的元标记作为属性,则您不必在 Fb.ui 函数调用中指定元标记。
并在 init 函数中引入 ChannelUrl 选项以避免进一步的错误。
Also make sure that multiple meta tags are not sent to Facebook.
For eg, if your page already has meta tags for Fb as properties, you will not ave to specify meta tags in your Fb.ui function call.
And introduce a ChannelUrl option in your init function to avoid further errors.
我最近遇到了同样的问题。 Facebook 会在发送链接之前分析您的页面,如果不能,则会抛出 500 错误。
更多信息:
如果您的页面不返回 200 代码,则它不会分析您的页面,并会抛出 500 错误。
确保您链接的页面不会重定向到任何其他页面,即使它们位于您的应用程序内。重定向是 3xx 代码 - Facebook 不接受该代码。
I recently faced the same problem. Facebook will analyse your page before sending a link, if it cant, it will throw a 500 error.
More info:
If your page does not return a 200 code, it will not analyse your page, and will throw up a 500 error.
Make sure the page you link does not redirect to any other pages, even if they are within your app. A redirect is 3xx code - which is not accepted by facebook.