페이스북 공유하기 소스 분석좀 부탁드려요.
<html><head><script src="http://www.description.co.kr/js/jquery-1.8.3.min.js"></script></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', // 앱 IDstatus : 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['picture'] = 'http://www.description.co.kr/img/logo.png';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
이렇게 에러를 뿌려버립니다.
잘되는 소스코드가 있긴하나..
별 문제 없어보이는데 왜 안될까 싶네요..
만들어보신분 답변 부탁드립니다.
감사합니다.
게시판 목록
개발자톡
| 번호 | 제목 | 글쓴이 | 날짜 | 조회 |
|---|---|---|---|---|
| 1284 | 11년 전 | 3079 | ||
| 1283 |
울라라라우
|
11년 전 | 863 | |
| 1282 |
senseme
|
11년 전 | 1310 | |
| 1281 | 11년 전 | 1499 | ||
| 1280 | 11년 전 | 773 | ||
| 1279 | 11년 전 | 1068 | ||
| 1278 | 11년 전 | 880 | ||
| 1277 |
버섯먹은나
|
11년 전 | 815 | |
| 1276 | 11년 전 | 676 | ||
| 1275 | 11년 전 | 1089 | ||
| 1274 | 11년 전 | 1316 | ||
| 1273 |
|
11년 전 | 1238 | |
| 1272 | 11년 전 | 1352 | ||
| 1271 | 11년 전 | 1314 | ||
| 1270 | 11년 전 | 762 | ||
| 1269 | 11년 전 | 945 | ||
| 1268 | 11년 전 | 1353 | ||
| 1267 |
TPSint
|
11년 전 | 734 | |
| 1266 | 11년 전 | 6648 | ||
| 1265 | 11년 전 | 1136 | ||
| 1264 | 11년 전 | 928 | ||
| 1263 | 11년 전 | 1497 | ||
| 1262 | 11년 전 | 857 | ||
| 1261 |
EngineMan
|
11년 전 | 3628 | |
| 1260 | 11년 전 | 1295 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기