hello. has anyone tried to use ionic with Facebook connect and Parse? i get the facebook login to work fine, but when I try to link to Parse as my backend I have no clue of what I’m doing. Would love some directions if you know something about it. i have the parse script on my index.html, but i’m not sure it should be there:
<script>
window.fbAsyncInit = function() {
Parse.FacebookUtils.init({
appId : 'xxxx', // Facebook App ID
channelUrl :'channel.html', // Channel File
status : true, // check login status
cookie : true, // enable cookies to allow Parse to access the session
xfbml : true // parse XFBML
});
// Additional initialization code here
};
(function(d, debug){
var js, id = 'facebook-jssdk', ref = d.getElementsByTagName('script')[0];
if (d.getElementById(id)) {return;}
js = d.createElement('script'); js.id = id; js.async = true;
js.src = "//connect.facebook.net/en_US/all" + (debug ? "/debug" : "") + ".js";
ref.parentNode.insertBefore(js, ref);
}(document, /*debug*/ false));
</script>
and I created a controller
controllers.controller('LoginCtrl', function ($scope, $location, ParseService) {
$scope.FB_login = function() {
ParseService.FB_login(function(user) {
// When service call is finished, navigate to items page
$location.path('/tab');
});
}
})
LoginCtrl.$inject = ['$scope', '$location', 'ParseService']
Currently there is no support for handling the facebook login by Parse via the InAppBrowser i guess.
I just debugged a bit and saw that the origin url in the request (which is handled by the Parse SDK / FB SDK) is something like file://{HASH} (example: file://f3b7695e8) which is correct because the origin of the request is a local embedded file from cordova. You can’t add a file:// path to your facebook app, so there is no way to get around it.
I have apps working using ionic / angular / parse / phonegap - working well however haven’t implemented the FB interface.
Can you give me an idea of your use case or workflow for FB integration and I could have a go
i have successfully integrated Parse.com with my ionic app with the Parse Facebook login as well, everything’s working fine in my chrome browser, then i add the cordova fb connect plugin and build my app using phonegap build, test it on my device and nothing happens when i click the login button, no response at all not even any error messages from fb, any clues for that? thx in advanced.
From what I’ve read it seems most people used parse on the client side (angularjs code). I went in a differrent direction and used it with my nodejs server. I’m able to login with twitter and instagram. Adding facebook would follow the same principles applied for twitter and instagram.
Nice to hear that u already success doing facebook login using ionic and parse.
Could you give me a full example how to do that ?
There is so many different documentation that make me so confused how to use it.
I need explanation about …