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

查看:240
本文介绍了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错误code:2

API Error Code: 2

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

API Error Description: Service temporarily unavailable

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

Error Message: Service temporarily unavailable

下面是我的code:

<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>

我的code越来越测试用户的正确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天全站免登陆