CanvasAuthorizer授权()没有返回的Facebook C#SDK真 [英] CanvasAuthorizer Authorize() not returning true on facebook C# sdk

查看:122
本文介绍了CanvasAuthorizer授权()没有返回的Facebook C#SDK真的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我下载了Facebook的C#SDK 4.1.1,并纳入它在一个小3.5SP1 ASP.NET Web项目。当我运行VS Studio 2008中的应用程序,它让我安装我的Facebook应用程序。当我登录到Facebook上,我可以看到,安装在我的应用程序,因为我看到它在我的主页左侧导航。

I downloaded the Facebook C# SDK 4.1.1, and incorporated it on a small ASP.NET 3.5SP1 web project. When I run the application from VS Studio 2008, it allowed me to install my Facebook application. When I log onto facebook, I can see that my app installed, as I see it on my home page left nav.

当我点击应用程序,它会显示在我的Facebook应用程序的iframe Default.aspx页。看起来它的工作,对不对?不,它不需要,因为当我调试localhost上的网页,我看到在CanvasAuthorizer应用程序的授权()返回FALSE。

When I click on the app, it displays the default.aspx page on my facebook app iframe. Looks like it worked, right? No it doesn't because when I debug the page on localhost, I see that the Authorize() on the CanvasAuthorizer app returns FALSE.

我在IIS 5.0中创建一个Web应用程序,以便默认VS Studio调试器不会干扰。

I created a web app in IIS 5.0 so that the default vs studio debugger doesn't interfere.

下面是他们的Facebook我已经设置的设置和其他相关信息。

Here are they facebook settings I have set and other relevant information.

任何帮助是极大AP preciated!

Any help is greatly appreciated!

谢谢!

画布页面
http://apps.facebook.com/mynewapp/

Canvas Page "http://apps.facebook.com/mynewapp/"

画布网址
的http://本地主机/ MyNewApp /

帆布FBML / IFRAME
IFRAME

Canvas FBML/iframe iframe

我的网页加载:

    protected void Page_Load(object sender, EventArgs e)
    {
        fbApp = new FacebookApp();
        authorizer = new CanvasAuthorizer(fbApp);
        authorizer.Perms = requiredAppPermissions;

            if (authorizer.Authorize())
        {
            ShowFacebookContent();
        }
    }

下面是我的web.config的有关章节:

Here are the relevant sections of my web.config:


    
  


   
    
    
     
     
     
     
    
   
  
 
  
  
 
 


   
   
   
   
      
    

推荐答案

发现了问题:

http://adamyoung.net/IE-Blocking-iFrame-Cookies

问题只发生在IE浏览器。 IE块饼干中的iframe ...必须设置标题中允许Cookie。

The issue was only happening in IE. IE blocks iframe cookies...have to set the header to allow cookies.

这篇关于CanvasAuthorizer授权()没有返回的Facebook C#SDK真的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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