Javascript で Facebook API を介して友人のウォールに投稿を公開したいのですが、「FB.api」に「プライバシー」を挿入すると、このコードが正しく実行されません。誰かが私を助けることができますか?ありがとうございました。
var privacy = {value: 'CUSTOM', friends: 'SOME_FRIENDS', allow: '{UID}'};
var privacy2 = JSON.stringify(privacy);
FB.api("/{UID}/feed", 'post', {
message: 'Message',
privacy: privacy2,
}, function(response) {
if (!response || response.error) {
alert(response.error);
} else {
alert('Message sent!');
}
}
);