Reputation: 1418
i'm new to Steroids.js and PhoneGap. I'm trying to create application that requires Facebook login. So the problem starts when i'm trying to get Facebook plugin to work.
My settings: "steroids-js": "3.1.x"
I have followed this guide - http://guides.appgyver.com/steroids/guides/phonegap_on_steroids/facebook-connect-plugin/
I have created Scanner application with Facebook plugin in it.
Downloaded custom created scanner app in my iphone and tried to scan barcode of my app, which requires Facebook login, but it shows me and error on app lunch:
My index.html file:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf8">
<meta name="viewport" content="width=device-width">
<title>La Rocca Revolution</title>
<link rel="stylesheet" href="/vendor/topcoat/css/topcoat-mobile-light.css" />
<link rel="stylesheet" href="/stylesheets/application.css" />
<script src="/javascripts/onerror.js"></script>
<script src="/javascripts/console.log.js"></script>
<script src="http://localhost/cordova.js"></script>
<script src="/components/steroids-js/steroids.js"></script>
<script src="http://localhost/cdv-plugin-fb-connect.js"></script>
<script src="http://localhost/facebook-js-sdk.js"></script>
<script src="/components/jquery/jquery.js"></script>
<script src="/javascripts/application.js"></script>
</head>
<body>
<div id="home">
<div class="container">
<div id="login-menu">
<a href="javascript:void(0);" ontouchend="login()" id="facebook-login">Login With Facebook</a>
<div id="divider">or</div>
<a href="javascript:void(0);" ontouchend="simpleLogin()" id="simple-login">Simple Login</a>
</div>
<div id="simple-login-menu">
<input type="text" placeholder="First name" name="fname" id="fname">
<input type="text" placeholder="Last name" name="lname" id="lname">
<input type="email" placeholder="E-mail" name="email" id="email">
<a href="javascript:void(0);" ontouchend="addToGuestList()" id="add-to-guestlist">Add to guestlist</a>
</div>
</div>
</div>
</body>
</html>
My application.js file:
FB.init({
appId: 1376384525959378,
nativeInterface: CDV.FB
})
function login() {
FB.login(function(response) {
if (response.session) {
FB.api('/me', function(response) {
alert('Good to see you, ' + response.name + '.');
});
} else {
console.log('User cancelled login or did not fully authorize.');
}
});
}
My steroids.js cloud settings for scanner:
My Facebook application settings:
Upvotes: 0
Views: 457
Reputation: 524
As the link itself says
The Steroids-supported way to use the official Facebook plugin is to use Steroids Add-ons. To use the Facebook plugin without the Facebook Add-on, refer to the documentation on the plugin’s GitHub Page, though note that we only offer support for users using the Facebook plugin via the Steroids Facebook Add-on.
You must use their paid addons now.
Upvotes: 0