首页 \ 问答 \ 错误消息:redirect_uri不属于应用程序(Error Message: redirect_uri is not owned by the application)

错误消息: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
更新时间:2021-12-09 09:12

最满意答案

没有办法“轻松”做到这一点。

虽然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/
  • 尝试在Profles中使用iframe - >所需的配置文件 - >插件参数 - >允许IFrame。 Try to allow iframe in Profles -> desired Profile -> Plugin parameters -> Allow IFrames.

相关文章

更多

最新问答

更多
  • 获取MVC 4使用的DisplayMode后缀(Get the DisplayMode Suffix being used by MVC 4)
  • 如何通过引用返回对象?(How is returning an object by reference possible?)
  • 矩阵如何存储在内存中?(How are matrices stored in memory?)
  • 每个请求的Java新会话?(Java New Session For Each Request?)
  • css:浮动div中重叠的标题h1(css: overlapping headlines h1 in floated divs)
  • 无论图像如何,Caffe预测同一类(Caffe predicts same class regardless of image)
  • xcode语法颜色编码解释?(xcode syntax color coding explained?)
  • 在Access 2010 Runtime中使用Office 2000校对工具(Use Office 2000 proofing tools in Access 2010 Runtime)
  • 从单独的Web主机将图像传输到服务器上(Getting images onto server from separate web host)
  • 从旧版本复制文件并保留它们(旧/新版本)(Copy a file from old revision and keep both of them (old / new revision))
  • 西安哪有PLC可控制编程的培训
  • 在Entity Framework中选择基类(Select base class in Entity Framework)
  • 在Android中出现错误“数据集和渲染器应该不为null,并且应该具有相同数量的系列”(Error “Dataset and renderer should be not null and should have the same number of series” in Android)
  • 电脑二级VF有什么用
  • Datamapper Ruby如何添加Hook方法(Datamapper Ruby How to add Hook Method)
  • 金华英语角.
  • 手机软件如何制作
  • 用于Android webview中图像保存的上下文菜单(Context Menu for Image Saving in an Android webview)
  • 注意:未定义的偏移量:PHP(Notice: Undefined offset: PHP)
  • 如何读R中的大数据集[复制](How to read large dataset in R [duplicate])
  • Unity 5 Heighmap与地形宽度/地形长度的分辨率关系?(Unity 5 Heighmap Resolution relationship to terrain width / terrain length?)
  • 如何通知PipedOutputStream线程写入最后一个字节的PipedInputStream线程?(How to notify PipedInputStream thread that PipedOutputStream thread has written last byte?)
  • python的访问器方法有哪些
  • DeviceNetworkInformation:哪个是哪个?(DeviceNetworkInformation: Which is which?)
  • 在Ruby中对组合进行排序(Sorting a combination in Ruby)
  • 网站开发的流程?
  • 使用Zend Framework 2中的JOIN sql检索数据(Retrieve data using JOIN sql in Zend Framework 2)
  • 条带格式类型格式模式编号无法正常工作(Stripes format type format pattern number not working properly)
  • 透明度错误IE11(Transparency bug IE11)
  • linux的基本操作命令。。。