错误消息:redirect_uri URL格式不正确错误

问题描述 投票:2回答:1

大约2小时前,我的应用程序中出现了以下错误。

所有三个应用程序都使用共享SSL托管在同一服务器上。

<application name>发生错误。请稍后再试。

API错误代码:100 API错误说明:无效参数错误消息:redirect_uri URL格式不正确

关于什么会导致我的应用程序突然发生变化的想法?

当我尝试使用sendRequestToManyRecipients()函数或发布到用户墙时,会弹出错误。

用于生成弹出窗口的代码

<script>
    FB.init({
        appId  : '<?php echo $fbconfig['appid']?>',
        status : true,
        cookie : true,
        oauth: false
    });

    function sendRequestToManyRecipients() {
        FB.ui({method: 'apprequests',
          message: ('I just entered the Payntwagon Audo Targa Terminator Competition! Payntwagon Audio is giving away a brand new Targa Terminator 4 channel amplifier! Enter today to win!'), href: 'http://www.facebook.com/payntwagon?sk=app_279329708764904',
        }, requestCallback);
    }


    function requestCallback(response)
    {
        if(response && response.request) {
            loadPopup();
        } else {

        }
    }

</script>
javascript facebook facebook-graph-api
1个回答
0
投票
You can do the following :

1) encode the url before sending, ie both fb url as well as return url
   u can use javascript functions or php functions for encoding url

//encodeURIComponent(url); // in javascript u can do this

2) Also check that the return url specified is valid
© www.soinside.com 2019 - 2024. All rights reserved.