简体   繁体   English

无法邀请朋友参加活动

[英]Unable to invite friends to event

I am trying to create an app that creates and invites users to an event. 我正在尝试创建一个可创建并邀请用户参加活动的应用程序。 I can successfully create the event but I am unable to invite users to this event. 我可以成功创建活动,但是无法邀请用户参加此活动。

I am using the following code: 我正在使用以下代码:

$.post('createEvent.php', { title: $("#evTitle").val(), start_time: aj.dateJson, location: aj.lockdownLoc.vicinity, city: aj.cityName, guests: invitees }, function(data){
    n = data.split('.');
    console.log('/'+ n[0] +'/invited?users='+invitees+'&'+n[1]);
    FB.api('/'+ n[0] +'/invited?users='+invitees+'&'+n[1],'post',function(resp) {
                console.log(resp);  // should return true
            });

        return false;
        })

It gives me an error: "The passed argument could not be parsed as a url. ...on(a,b){if(!FB.Dom._cssRules)FB.Dom._cssRules={};var c=true;ES5(b,'forEach',true..." 它给我一个错误:“无法将传递的参数解析为url。...on(a,b){if(!FB.Dom._cssRules)FB.Dom._cssRules = {}; var c = true ; ES5(b,'forEach',true ...”

you need to separate the users id's with a coma 您需要用逗号分隔用户ID

like: 喜欢:

/[EVENT ID]/invited?users=[ID1],[ID2],[ID3],[ID4]

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM