开发者

Facebook Application - Url-rewriting with fbml?

I have an app that I'm creating with CakePHP, which rewrites the url from something illegible to most users to something a little easier to comprehend. I'm having a problem when I use the FBML canvas.

When I try to access, say, http://apps.facebook.com/myapp/articles, I get the following error:

Received HTTP error code 404 while loading http://www.myapp.com/myapparticles/

I did notice that when I try to access http://apps.facebook.com/myapp/articles/posts, it changes the error to show the following url, which is slightly different: http://www.myapp.com/myapparticles/posts

Which lead me to try accessing it with this: http://apps.facebook.com/myapp//articles, which does work most of the time, though for some reason sometimes it 开发者_Python百科will give the previous error. (And it also seems like a hack-y way of getting it to work).

I'm at a loss for how to fix this.


Turns out I was missing the trailing slash (http://www.myapp.com/myapp/) on the url that I specified as my canvas callback, which is in the app settings. Putting it there fixes the problem.


This happens when you are not using semantic markup or you have an error or some code not supported by fb. Also that famous error is generated by fb when it is down or slow too.

I would suggest you checking your code thoroughly and going through fb documentation. That should help you the most. thanks

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜