1
저는 웹 사이트에서 일하고 있습니다. 그 중 일부로 사용자가 친구를 초대 할 수 있도록 허용하고 있습니다. 다음 코드 사용Facebook API : 친구에게 메시지 보내기 테스트/관리 사용자 만 사용
// assume we are already logged in
FB.init({appId: 'xxxxxxxx49030', xfbml: true, cookie: true});
function sendInvites(fb_ids) {
var link_url = "<?php echo base_url()?>invited/?code=100627510332492694";
FB.ui({
method: "send",
to: fb_ids,
name: "Join example.com",
description: "hello",
picture: "http://www.example.com/images/logo-orange.png",
link: link_url
}, function(response) {
alert(response)
if (!response){
return;
}
$.post("/invite/new/", {
fb_ids: fb_ids
}, function(data) {
if (data.status == "success") {
alert(data.status);
} else {
alert(data.message);
}
}, "json");
});
}
빠진 것이 무엇인지 이해하지 마십시오.