Problem related to FB API and AngularJS (number of likes)

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?

You need to bind Angular properties (like ctrl) to $scope, otherwise you can’t use them in your index.html

I was trying in this way, but it wasn’t work (maybe I did something wrong…).

You started your <head> twice as well (just after your <html> is the first one). You should remove the second one.

Okay. I did it. But it doesn’t make any diffrence.

About the facebook api. Where are you reading about it? I haven’t used this one in particular. Are you following the instructions correctly?

I read:


https://developers.facebook.com/docs/graph-api/reference/v2.3/object/likes

To be onest, I’m not sure if I do it correctly. It seems to me that’s OK.

Try this one instead: https://developers.facebook.com/docs/javascript/howto/angularjs