AngularJS, FB API - problem with function.

246 views
Skip to first unread message

HardPDK

unread,
Mar 31, 2016, 4:42:11 PM3/31/16
to AngularJS
Hello, I've got a problem related to FB API, JS and Angular. I've got some part of code in index.html and I wrote another part of code in file called script.js. There should be 2 functions: first - visibility of buton, second - sending and getting data from Facebook (number of likes and name of profil):
http://plnkr.co/edit/G80gClkiLGr9ZxJpN2sp?p=preview
There're no problems with the first, but I have no idea why the second doesn't work. Any ideas? What is wrong?

Tito

unread,
Mar 31, 2016, 7:57:11 PM3/31/16
to AngularJS
look at the error in your console

angular.js:13236 Error: init not called with valid version
Error
    at Object.a (sdk.js:43)
    at window.FB.require (sdk.js:11)
    at window.FB.require (sdk.js:11)
    at window.FB.require (sdk.js:11)
    at window.FB.require (sdk.js:11)
    at window.FB.require (sdk.js:11)
    at window.FB.require (sdk.js:11)
    at window.FB.require (sdk.js:11)
    at window.FB.require (sdk.js:11)
    at window.FB.require (sdk.js:11)
Reply all
Reply to author
Forward
0 new messages