doumiebiao6827 2011-08-23 01:39
浏览 50

Codeigniter - Facebook - JQuery Mobile问题

I'm working on an mobile web app that list user's friends to post on their walls. I'm using PHP SDK as FB Framework. When facebook redirects back to the original URL, it adds a query string. This is how the return URL in the browser address bar looks like:

http://mysyte.com/friends?state=11ccb40641675f22adc52aeff2562a0f&code=AQBsK6AipjCoQ96i00mHz5gJe4MqgxQCbRwZQKqHWngO8X54eyb3o1qZS7Hz0O335SVUVSUHT05M4xtC5FbTclFolxD7Z2rUM5m7zAvIx-TJN-V8aP1L6WtRMsqMWIWclHJZqWqsP9leyAs0H6HxSVvhH50ut8IKv7wowmojNmyW0pQtmUVAsLi0-8WTo-Y_xCg#_

When the view is loaded, JQuery mobile tries to call this:

"http://mysite.com/friends/_"

and it gets 404 from Codeigniter because the underscore. As a result of this i have a blank page.

I tried to fix this by changing the REQUEST_URI to PATH_INFO, enabling query strings and an empty string in permitted_uri_chars without any luck.

Also, when I print out the $_SERVER['REQUEST_URI'] I get:

/friends?state=11ccb40641675f22adc52aeff2562a0f&code=AQBsK6AipjCoQ96i00mHz5gJe4MqgxQCbRwZQKqHWngO8X54eyb3o1qZS7Hz0O335SVUVSUHT05M4xtC5FbTclFolxD7Z2rUM5m7zAvIx-TJN-V8aP1L6WtRMsqMWIWclHJZqWqsP9leyAs0H6HxSVvhH50ut8IKv7wowmojNmyW0pQtmUVAsLi0-8WTo-Y_xCg

(WITHOUT the trailing #_ as it looks in the browser address bar)

If I manually delete the #_ at the end in the browser, it loads ok again.

Any ideas?

Thanks.

  • 写回答

2条回答 默认 最新

  • dongmei8760 2011-08-25 05:10
    关注

    Ah yes, the infamous hash symbol at the end of the URL bug. Let me guess, your testing this on an Android emulator using the built in webkit browser. It will work on an actual device, also try this on another emulator version.

    I suspect that there is very little known about this, but Iv'e seen this little issue in several questions on SO and Iv'e encountered it in my own tests. There is definitely something wrong here.

    评论

报告相同问题?

悬赏问题

  • ¥15 matlab有关常微分方程的问题求解决
  • ¥15 perl MISA分析p3_in脚本出错
  • ¥15 k8s部署jupyterlab,jupyterlab保存不了文件
  • ¥15 ubuntu虚拟机打包apk错误
  • ¥199 rust编程架构设计的方案 有偿
  • ¥15 回答4f系统的像差计算
  • ¥15 java如何提取出pdf里的文字?
  • ¥100 求三轴之间相互配合画圆以及直线的算法
  • ¥100 c语言,请帮蒟蒻写一个题的范例作参考
  • ¥15 名为“Product”的列已属于此 DataTable