angularjs - Cannot list Ad Accounts in facebook app -
i'm developing pure-html/js web application (actually i'm using angularjs; "pure" mean: i'm not using server side technology) uses facebook-connect button this:
<fb:login-button max_rows="1" size="xlarge" scope="email,public_profile,ads_management" show_faces="false" auto_logout_link="false"></fb:login-button>
such button asks permission: ads_management
, basic user data. i'm testing ad-management functionality.
however, ask 2 queries facebook inside controller:
$scope.fetchdata = function() { fb.api('/me', function(response){ $scope.$apply(function(){ console.log("inapp::fetchdata()"); console.log(response); console.log("~inapp::fetchdata()") }); }); }; $scope.fetchaccounts = function() { fb.api('/me/adaccounts', function(response){ $scope.$apply(function(){ console.log("inapp::fetchaccounts()"); console.log(response); console.log("~inapp::fetchaccounts()"); }); }); }; $scope.fetchaccountdata = function(account_id) { }; $scope.fetchdata(); $scope.fetchaccounts();
for narrow-purposes printed contents of controller. assume such controller exists, requires person logged in facebook, , user logged in.
my issues are:
- the login button not update page when login. because no
onlogin=
put. question: how can assign such attribute in angular way? (i.e. handler coming scope). $scope.fetchdata
executed. however,$scope.fetchaccounts
not. i'm asking because includedads_management
permission in button. question: missing? (error: code: 10 message: "(#10) not have sufficient permissions perform action" type: "oauthexception"). edit - additional notes: deauthorized application in account, , reauthorized it: never asks meads_management
permission in popup dialog.
the first question, no idea. second question, app not whitelisted ads api usage. ads api documentation on how request access.
Comments
Post a Comment