基于Ajax的Web应用程序 - 在Facebook登录之后模拟真实请求 [英] Ajax based web application - Mocking a real request after facebook login

查看:162
本文介绍了基于Ajax的Web应用程序 - 在Facebook登录之后模拟真实请求的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在构建一个基于ajax的网络应用程序,让Facebook用户登录到应用程序,享受应用程序的某些高级选项,如保存其设置等(用户没有登录到他的Facebook帐户,但它给他额外的权限)。



我在ASP.NET WebForms平台上使用C#的Facebook SDK。
整个应用程序是基于AJAX的,这意味着在用户决定登录(使用Facebook JS API)并重新加载页面之后,从那一点开始的整个通信是基于ajax的。



我想知道是否有办法使AJAX请求以与手动通过浏览器完成的方式相同 - 这意味着所有相关的Facebook和当前会话cookie将被发送在其标题中。我问这个,因为我不想创建一个自定义协议,它将标识ajax请求的用户。



希望我以后是明确的这个帖子...

解决方案

这是我的应用程序屏幕截图,它是ajax,在你的情况下,和






I'm building an ajax based web application which lets Facebook users who login to the application, enjoy certain advanced options of the application, like saving their settings, etc` (the user doesn't HAVE to login to his facebook account, but it gives him extra privileges).

I'm using the C# Facebook SDK on ASP.NET WebForms platform. The entire application is AJAX based, which means that after the user decides to log in (using Facebook JS API) and reload the page, the entire communication from that point on is ajax based.

I was wondering if there's a way to make those AJAX requests in the same way I would've done it manually through the browser - meaning that all related facebook and current session cookies will be sent in it's headers. I'm asking this since I don't want to create a custom protocol which will identify the user of the ajax request.

Hope what i'm after is clear through this post...

解决方案

This is my app screen shot, it is ajax as in your case and:

这篇关于基于Ajax的Web应用程序 - 在Facebook登录之后模拟真实请求的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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