开发者

Facebook app with asp.net

I am trying to get my first hello world application on facebook using asp.net with facebook toolkit.

I am hosting my files on www.aspspider.info/jasminm89/ using it as a canvasurl

and link to my facebook app is http://apps.facebook.com/mytesterapp/

At that location i have: default.html page with the h1 tag with plain text. When I visit my app on facbook I get message:

The page cannot be displayed

The page you are looking for cannot be displayed because an invalid method (HTTP verb) was used to attempt access. Please try the following:

Contact the Web site administrator if you believe that this request should be allowed. Make sure that the Web site address displayed in the address bar of your browser is spelled and formatted correctly. HTTP Error 405 - The HTTP verb used to access this page is not allowed. Internet Information Services (IIS)

Technical Information (for support personnel)

Go to Microsoft Product Support Services and perform a开发者_运维问答 title search for the words HTTP and 405. Open IIS Help, which is accessible in IIS Manager (inetmgr), and search for topics titled Setting Application Mappings, Securing Your Site with Web Site Permissions, and About Custom Error Messages.

here source code from facebook, where it loads my page:

<form action="http://aspspider.info/jasminm89/" 
method="post" target="iframe_canvas" 
id="canvas_iframe_post_4e513da6b75410144827584" 
onsubmit="return Event.__inlineSubmit(this,event)"><input 
type="hidden" autocomplete="off" name="signed_request"
value="xxx....."></form>

One point here. I setup my account on 000webhost.com and by default there is default.php created, I copy the link to my facebook and it loads the page, it worked as well with plain index.html.

final This error is because with IIS we can't use static html pages to be called in this way I now upload plain .aspx page with some text and it worked.


First this sounds like an error with your server configuration, not with accessing the Facebook API/SDK.

Secondly, don't you need to add the call to the facebook SDK and include the <div id="fb-root"></div> ?

Or are you using the C# Facebook SDK?


I iis you can not handle post method coming from facebook including signed_request.

So firstly reconfigure IIS allowing handle post method. Or for simple start make index.html as the default document, put inside "hello world", then process the second step.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜