Facebook API:这个 facebookredirect.axd 来自哪里?
因此,我已经设置了所有内容来邀请用户访问我网站上的注册页面并跟踪他们的邀请代码,但现在每当用户接受邀请时,他们最终都会收到以下错误:
HTTP 错误 404.0 - 未找到
您正在查找的资源for 已被删除、更名或暂时不可用。
这是 URL:
为什么redirect_uri是http://www.fisharwe.com/facebookredirect.axd
而不是我在代码中使用top.location.href="whatever.com"<设置的内容/代码>?
更新:
似乎这个问题已经以某种方式得到解决。但它仍然没有重定向到我网站的注册页面!以下是登陆页面的源代码:
UPDATE2:
这是我的 C# 代码:
[CanvasAuthorize]
public ActionResult Index()
{
var fb = new FacebookWebClient(FacebookWebContext.Current);
dynamic requestInfo = fb.Get("/me/apprequests/");
var b = requestInfo.Count;
if (requestInfo.data.Count > 0)
{
var a = requestInfo["data"][0]["data"];
//ViewData.Add("TrackingData", a);
return Redirect(redirectUrl + "?code=" + a);
}
return RedirectToAction("Index", "Home");
}
So I've set up everything to invite users to the registration page on my site and track their invitation code, but now whenever a user accepts the invitation they end up getting the following error:
HTTP Error 404.0 - Not Found
The resource you are looking for has been removed, had its name changed, or is temporarily unavailable.
And here's the URL:
Why is the redirect_uri http://www.fisharwe.com/facebookredirect.axd
and not what I've set in my code using top.location.href="whatever.com"
?
UPDATE:
Seems like that problem has been resolved somehow. But it still does not redirect to the registration page of my site! Here's the source code of the landing page:
<html><head><script type="text/javascript">
top.location = "http://www.facebook.com/dialog/oauth/?state=eyJyIjoiaHR0cDovL2FwcHMuZmFjZWJvb2suY29tL2Zpc2hhcndlLz90eXBlPWRpc2NvdmVyeSJ9&client_id=217174461634478&redirect_uri=http://www.fisharwe.com/facebookredirect.axd";
</script></head><body></body></html>
UPDATE2:
This is my C# code:
[CanvasAuthorize]
public ActionResult Index()
{
var fb = new FacebookWebClient(FacebookWebContext.Current);
dynamic requestInfo = fb.Get("/me/apprequests/");
var b = requestInfo.Count;
if (requestInfo.data.Count > 0)
{
var a = requestInfo["data"][0]["data"];
//ViewData.Add("TrackingData", a);
return Redirect(redirectUrl + "?code=" + a);
}
return RedirectToAction("Index", "Home");
}
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
你在 web.config 中设置了 http 处理程序吗?
have you setup the http handler in web.config?