Quantcast
Channel: Ionic Framework - Ionic Forum
Viewing all articles
Browse latest Browse all 49167

Phonegap-facebook-plugin?

$
0
0

@developer_med wrote:

hey guys, i want to implement this service by using this http://ngcordova.com/docs/plugins/facebook/
i think there are more than solution but i still want to use ngCordova extension it look easy and lore fast
there is a portion of my code


myApp.controller('loginCtrl', function($scope,$state,$location,$ionicPlatform,$cordovaFacebook) {

     $scope.loginWithFB=function(){

       $ionicPlatform.ready(function() {

            console.log("ionicPlatform.ready fct");

            if(window.cordova && window.cordova.plugins.Keyboard) {
                    cordova.plugins.Keyboard.hideKeyboardAccessoryBar(true);
                    cordova.plugins.Keyboard.disableScroll(true);
                  }
            if(window.StatusBar) {
                 StatusBar.styleDefault();
            }

        /*      var fbLoginSuccess = function (userData) {
                        alert("UserInfo1: " + JSON.stringify(userData));
                        console.log("UserInfo1: " + JSON.stringify(userData));
                        console.log("success .....");
                        alert("success");
                    }

    */

              $cordovaFacebook.login(["public_profile"]).then(function(success) {
                  alert("UserInfo1: " + JSON.stringify(success));

              }, function (error) {
                   console(error);
                   alert(""+error);
                });

            });

note that i got just th APP_ID and APP_NAME from facebook but issue is when i test that in my mobile i got thath

plz someone help i don't know hot solve that plz .

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 49167

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>