Facebook API:我可以邀请测试用户使用我的应用程序吗? [英] Facebook API: Can I Invite A Test User To My Application?

查看:26
本文介绍了Facebook API:我可以邀请测试用户使用我的应用程序吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试创建测试用户(有效),然后邀请他们使用我的应用,以便我可以测试是否可以检索跟踪数据(在数据字段内).不幸的是,当我向测试用户发送邀请时,出现异常:

I'm trying to create test users (works) and then invite them to my app so I could test whether I could retrieve the tracking data (inside the data field). Unfortunately, when I send an invite to a test user I get an exception:

API 错误代码:2

API 错误说明:服务暂时不可用

API Error Description: Service temporarily unavailable

错误信息:暂时服务不可用

Error Message: Service temporarily unavailable

这是我的代码:

<input type="text" value="@ViewBag.TestId" id="theId" />

<div id="fb-root"></div>
<script type="text/javascript">
    window.fbAsyncInit = function() {
        FB.init({
          appId   : '193005690721590',
          status  : true,
          cookie  : true,
          xfbml   : true
        });
    };
    console.log(@ViewBag.TestId);
  $('#sendReq').click(sendRequest);
    function sendRequest() {
        FB.ui({
            method: 'apprequests',
            message: 'Invitation to the test application!',
            title: 'Send your friends an application request',
            to: $('#theId').val(),
            data: 'someCode'
        },
        function (response) {
            if (response && response.request_ids) {
                var requests = response.request_ids.join(',');
                $.ajax({
                    url: '/Home/Parse',
                    type: 'post',
                    data: response,
                    success: function (data) {
                        if (data.result === 'ok') {
                            alert("Everything went fine");
                            //top.location.href = '/Home/About';
                        }
                    }
                });
            } else {
                alert('canceled');
            }
        });
        return false;
    }

    (function() {
    var e = document.createElement('script');
    e.src = document.location.protocol + '//connect.facebook.net/en_US/all.js';
    e.async = true;
    document.getElementById('fb-root').appendChild(e);
} ());
</script>

我的代码正在获取测试用户的正确 ID,然后我尝试发送邀请但没有成功...

My code is getting the correct ID of the test user and then I'm trying to send the invite but with no success...

有什么想法吗?

推荐答案

我认为您的问题可能是由于您尝试从您自己的帐户邀请测试用户.测试用户 文档中列出的限制之一是测试用户可以与其他测试进行交互仅限用户,而不是网站上的真实用户."

I think your issue may be due to you trying to invite the test user from your own account. One of their limitations as listed on the Test Users docs is "Test users can interact with other test users only and not with real users on site."

这篇关于Facebook API:我可以邀请测试用户使用我的应用程序吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆