开发者

problems with multiples invitations to a event on facebook

开发者 https://www.devze.com 2023-04-06 19:11 出处:网络
I\'m tried use the multiples invitations method of facebook-gra开发者_如何学Pythonph API. of according the documentation,this is the syntax to send multiples invitations:

I'm tried use the multiples invitations method of facebook-gra开发者_如何学Pythonph API. of according the documentation,this is the syntax to send multiples invitations:

/EVENT_ID/invited?users=USER_ID1,USER_ID2,USER_ID3

I wrote this code:

$ids = 'id123,id12345';
    $ch = curl_init("https://graph.facebook.com/$e_id/invited?users=$ids?access_token={$token}");
        curl_setopt_array($ch,
            array(CURLOPT_SSL_VERIFYPEER => 0,
                  CURLOPT_RETURNTRANSFER => 1,
                  CURLOPT_CUSTOMREQUEST => 'POST'
            )
        );

I'm getting the following error:

{"error":{"message":"(#114) An id must be a valid ID string (e.g., \"123\")","type":"OAuthException"}}

How I fix this? Thanks in advance. :)


As it is written in error message it should be numeric strings i.e. "12345" and not "id12345", try real uids and don't invite your own uid.

hope this helps

0

精彩评论

暂无评论...
验证码 换一张
取 消