티스토리 뷰
Solve “Invalid App Id: Must be a number or numeric string representing the application id”
jihun202 2015. 8. 2. 16:57페이스북 developer 에서 app을 새로 생성하면 주는 key를 입력해주면 된다.
You wanted to have Facebook Like Button or Facebook Like Box and other Facebook social plugins on your website. You copy pasted to code Facebook generated for you on your web pages. If you do not have an App ID when you copied this, chances are the Facebook script will complain in your Web Browser’s console (e.g Firebug Console).
Invalid App Id: Must be a number or numeric string representing the application id. FB.getLoginStatus() called before calling FB.init(). all.js#xfbml=1 (line 56) |
To fix this issue, just do a “Create New App” in the Apps section in Facebook. And then go back to the Facebook Social Plugins page, pick a plugin, and regenerate the code for it.
Your Facebook plugin code before having an App ID:
<div id="fb-root"></div> <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/en_US/all.js#xfbml=1"; fjs.parentNode.insertBefore(js, fjs); }(document, 'script', 'facebook-jssdk'));</script> |
After you have assigned an App to the plugin
<div id="fb-root"></div> <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/en_US/all.js#xfbml=1&appId=<your-16-digit-app-id>"; fjs.parentNode.insertBefore(js, fjs); }(document, 'script', 'facebook-jssdk'));</script> |
Notice the difference in the highlighted code? Let me know if this solved your problem in the comment area.
'웹프로그래밍 > Javascript' 카테고리의 다른 글
| jQuery DatePicker 버튼 만들기 (동적 생성) (0) | 2015.10.03 |
|---|---|
| javascript comma and uncomma (0) | 2015.10.01 |
| 지정된 영역만 인쇄하기 (0) | 2015.06.15 |
| Javascript iBook EPUB 3.0 Images not working (0) | 2015.05.27 |
| jQuery $("img").load non-cache (0) | 2015.05.26 |
- Total
- Today
- Yesterday
- 사회이슈
- 재테크
- 부동산
- 세금
- 내집마련
- 앱테크
- 부동산시장
- 시사정치
- 고금리
- 적금
- 국제정세
- 주식시황
- 주담대
- 사건사고
- 금리인상
- 원달러환율
- 환율
- 증안펀드
- 나스닥
- 코스닥
- 트럼프관세
- 코스피
- SK하이닉스
- 금융
- 증시전망
- 외교안보
- 반도체주
- 부동산전망
- 글로벌경제
- 환율전망
| 일 | 월 | 화 | 수 | 목 | 금 | 토 |
|---|---|---|---|---|---|---|
| 1 | 2 | 3 | 4 | 5 | 6 | 7 |
| 8 | 9 | 10 | 11 | 12 | 13 | 14 |
| 15 | 16 | 17 | 18 | 19 | 20 | 21 |
| 22 | 23 | 24 | 25 | 26 | 27 | 28 |
| 29 | 30 |
