错误消息:redirect_uri不属于应用程序(Error Message: redirect_uri is not owned by the application)
::更新::链接不存在任何!
确实很奇怪,这绝对是一个错误! 我从另一个应用程序的app_id做了一个测试,它工作。 你自己看:
https://apps.megalopes.com/megabraziltv/test.php(app_id正确)
https://apps.megalopes.com/megabraziltv/test2.php (另一个应用程序的app_id)
--- / ---
我发现有几个人有同样的问题,所有的答案都是相同的:网站网址与REQUEST_URI(重定向网址)不同,
我的应用程序设置是:
保护页面标签网址:apps.megalopes.com/megabraziltv / ...
应用程序域:megalopes.com
码:
<div id="fb-root"></div> <script src="http://connect.facebook.net/pt_BR/all.js"> </script> <script> FB.init({ appId:'123456789', cookie:true, status:true, xfbml:true }); FB.ui({ method: 'apprequests', message: 'Here is a new Requests dialog...'}); </script>
这个简单的代码不会重定向到任何其他网址。 我在js控制台上测试得到相同的结果。 有时候会出现这种错误信息,有时会出现这样
API错误代码:191 API错误说明:指定的URL不属于应用程序错误消息:redirect_uri不属于应用程序。
::UPDATE:: LINKS DO NOT EXIST ANYMORE!
Very strange indeed, this is definitely a bug! I did a test with app_id from another application and it worked. See for yourself:
https://apps.megalopes.com/megabraziltv/test.php (app_id correct)
https://apps.megalopes.com/megabraziltv/test2.php (app_id from another application)
---/---
I found several people with the same question and all the answers are equal: Site URL is not same as REQUEST_URI (Redirecting URL)
My app setting are:
Secure Page Tab URL: apps.megalopes.com/megabraziltv/...
App Domain: megalopes.com
code:
<div id="fb-root"></div> <script src="http://connect.facebook.net/pt_BR/all.js"> </script> <script> FB.init({ appId:'123456789', cookie:true, status:true, xfbml:true }); FB.ui({ method: 'apprequests', message: 'Here is a new Requests dialog...'}); </script>
This simple code is not redirecting to any other url. I tested on the js console getting the same results. Sometimes works and sometimes I get this error message:
API Error Code: 191 API Error Description: The specified URL is not owned by the application Error Message: redirect_uri is not owned by the application.
原文:https://stackoverflow.com/questions/7476397
最满意答案
没有办法“轻松”做到这一点。
虽然Joomla在渲染之前会收集所有脚本和css,但是大量扩展只是在标记中输出
<script>
和<style>
标记。所以唯一真正的解决方案是编写一个解析所有资源并执行优化的系统插件。
你能找到的最好的实现是toomanyfiles ,它正确处理css而不是js:js的问题是你不能简单地将所有js移动到底部:modernizr和其他库影响类,需要是装在头上; 许多库和框架(甚至引导程序)都有一些直接输出标记的方法,更不用说
document.write()
:如果是这种情况,你必须手动区分。您可以从中获得95%以上的需求。
值得一提的是JCH Optimize ,它更不完整,但遵循类似的方法。
There is no way of doing this "easily".
While Joomla does collect all scripts and css before rendering them, a large number of extensions simply output the
<script>
and<style>
tags in the markup.So the only real solution is to write a system plugin that parses all the resources and performs the optimizations.
The best implementation you can find is toomanyfiles, which handles this correctly for css but not completely for js: the issue with js is that you can't simply move all js to the bottom: modernizr and other libraries affect the classes and need to be loaded in the head; and many libraries and frameworks (even bootstrap) have some methods that output markup directly, not to mention
document.write()
: if this is your case, you'll have to discriminate manually.You can get over 95% of what you need from it.
An honorable mention goes to JCH Optimize which is even less complete but follows a similar approach.
相关问答
更多-
你为什么不这样做: public function onContentPrepare($context, &$article, &$params, $page = 0) { $article->text = "new content"; } ? 编辑 根据您的回复,这是一种修改插件中整个页面内容/正文的方法。 将此方法添加到您的插件: public function onAfterRender() { $app = JFactory::getApplication(); $cur ...
-
模块应具有在单击链接时提交或更改URL的表单或链接。 然后,您可以使用以下方法读取url参数: $var_name = JFactory::getApplication()->input->get('var_name'); 然后,您可以使用$ var_name更改组件显示的数据。 The module should have a form or link that submits or changes the URL when clicking on the links. You can then rea ...
-
方法1 我找到的最好和最简单的方法是(和我正在使用的方法没有问题)来安装此扩展。 jQuery Easy。 它不是一个扩展,它会让你摆脱冲突。 http://extensions.joomla.org/extensions/core-enhancements/performance/jquery-scripts/18327 当使用jQuery实例和Mootools库时,此插件旨在帮助清理和解决前端和后端问题。 方法2 您可以将其包含在模板中,如下所示 有了这个: JHtml::_('jquery.framework'); // this is PHP so wrap it in PHP tags 完成后,您可以删除此代码: ...
-
作为JHtml帮助程序,您可以像在CMS中看到的任何其他JHtml调用一样使用它。 你可能知道, JHtml::_('behavior.framework'); 在CMS中启用MooTools。 好吧,有一个类似的函数JHtml::_('bootstrap.framework'); 这将加载Bootstrap JavaScript及其jQuery依赖项。 所以,如果你想启用Bootstrap的警报插件,只需调用JHtml::_('bootstrap.alert', 'optionalClassNameFor ...
-
直接与雅虎天气api集成会更容易。 http://developer.yahoo.com/weather/ It would be easier to integrate directly with the yahoo weather api. http://developer.yahoo.com/weather/
-
Joomla剥离了我的iframe(Joomla stripping my iframe)[2023-01-31]
尝试在Profles中使用iframe - >所需的配置文件 - >插件参数 - >允许IFrame。 Try to allow iframe in Profles -> desired Profile -> Plugin parameters -> Allow IFrames.