페이스북 공유하기 소스 분석좀 부탁드려요.

· 11년 전 · 1644
<html>
<head>
</head>
<body>
<script>(function(d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) return;
js = d.createElement(s); js.id = id;
js.src = "//connect.facebook.net/ko_KR/all.js#xfbml=1&appId=354047521446386";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>
<script>
window.fbAsyncInit = function() {
FB.init({
appId      : '354047521446386', // 앱 ID
status     : true,          // 로그인 상태를 확인
cookie     : true,          // 쿠키허용
xfbml      : true           // parse XFBML
});

FB.Event.subscribe('auth.login', function(response) {
document.location.reload();
});

};
</script>

<button class="share-btn">test</button>

<script>
document.querySelector('body').onclick = function(){

var params = {};
params['message'] = 'message';
params['name'] = 'name';
params['description'] = 'description';
params['link'] = 'http://description.co.kr';
params['caption'] = 'caption';
  
FB.api('/me/feed', 'post', params, function(response) {
  if (!response || response.error) {
    alert('Error occured');
  } else {
    alert('Published to stream - you might want to delete it now!');
  }
});


};
</script>
</body>

</html>

 

이렇게 실행하면 Error occured

이렇게 에러를 뿌려버립니다.

 

잘되는 소스코드가 있긴하나..

별 문제 없어보이는데 왜 안될까 싶네요..

 

만들어보신분 답변 부탁드립니다.

감사합니다.

|
댓글을 작성하시려면 로그인이 필요합니다.

프로그램

+
제목 글쓴이 날짜 조회
10년 전 조회 1,767
10년 전 조회 2,587
10년 전 조회 1,998
10년 전 조회 2,091
10년 전 조회 1,182
10년 전 조회 1,433
10년 전 조회 1,413
10년 전 조회 1,055
10년 전 조회 864
10년 전 조회 1,059
10년 전 조회 1,742
11년 전 조회 1,088
11년 전 조회 1,989
11년 전 조회 3,751
11년 전 조회 1,584
11년 전 조회 1,439
11년 전 조회 1,397
11년 전 조회 1,381
11년 전 조회 1,045
11년 전 조회 2,233
11년 전 조회 962
11년 전 조회 1,394
11년 전 조회 1,500
11년 전 조회 1,572
11년 전 조회 2,567
11년 전 조회 1,295
11년 전 조회 1,753
11년 전 조회 1,171
11년 전 조회 1,188
11년 전 조회 2,052
11년 전 조회 1,470
11년 전 조회 1,278
11년 전 조회 1,640
11년 전 조회 1,014
11년 전 조회 1,469
11년 전 조회 1,593
11년 전 조회 4,655
11년 전 조회 1,338
11년 전 조회 1,061
11년 전 조회 3,586
11년 전 조회 1,565
11년 전 조회 1,330
11년 전 조회 908
11년 전 조회 911
11년 전 조회 1,818
11년 전 조회 4,186
11년 전 조회 2,308
11년 전 조회 1,177
11년 전 조회 725
11년 전 조회 1,645
11년 전 조회 1,666
11년 전 조회 3,546
11년 전 조회 1,342
11년 전 조회 3,115
11년 전 조회 2,271
11년 전 조회 1,010
11년 전 조회 1,284
11년 전 조회 2,805
11년 전 조회 1,382
11년 전 조회 1,600
11년 전 조회 2,504
11년 전 조회 2,315
11년 전 조회 1,062
11년 전 조회 1,219
11년 전 조회 3,525
11년 전 조회 1,475
11년 전 조회 1,542
11년 전 조회 1,205
11년 전 조회 783
11년 전 조회 1,059
11년 전 조회 1,428
11년 전 조회 2,776
11년 전 조회 1,332
11년 전 조회 1,660
11년 전 조회 1,339
11년 전 조회 1,110
11년 전 조회 4,202
11년 전 조회 1,190
11년 전 조회 1,426
11년 전 조회 1,086
11년 전 조회 1,471
11년 전 조회 1,126
11년 전 조회 731
11년 전 조회 839
11년 전 조회 1,294
11년 전 조회 1,385
11년 전 조회 1,380
11년 전 조회 1,440
11년 전 조회 1,045
11년 전 조회 1,118
11년 전 조회 3,911
11년 전 조회 1,735
11년 전 조회 691
11년 전 조회 1,115
11년 전 조회 948
11년 전 조회 2,309
11년 전 조회 829
11년 전 조회 1,005
11년 전 조회 710
11년 전 조회 1,078
🐛 버그신고