Skip to content

Instantly share code, notes, and snippets.

View anderson631's full-sized avatar

Anderson Ferreira anderson631

  • Nanpos
  • Caruaru - PE - Brasil
View GitHub Profile
@anderson631
anderson631 / .js
Created October 21, 2015 19:02
Exemplo de login com Facebook no ionic + Cordova Oauth
$scope.facebookLogin = function() {
var facebook_appId = '...';
$cordovaOauth.facebook(facebook_appId, ['email', 'user_birthday', 'user_location']).then(function(result) {
$http.get('https://graph.facebook.com/v2.5/me', { params: { access_token: result.access_token, fields: 'id,name,email,gender,location,picture', format: 'json' }}).then(function(result) {
var usuarioBD = {
usuario_id_facebook: result.data.id,
usuario_nome: result.data.name,
usuario_email: result.data.email,
usuario_endereco_cidade: result.data.location.name
@anderson631
anderson631 / .html
Created October 21, 2015 19:27
Passo a passo para integração do flex-calendar no ionic
<!-- PASSO #1 -->
<!-- No arquivo "SeuApp/www/index.html", importar: -->
<link href="lib/flex-calendar/dist/flex-calendar.min.css" rel="stylesheet">
<script src="lib/flex-calendar/dist/flex-calendar.js"></script>
<script src="js/i18n/angular-locale_pt-br.js"></script>
<!-- PASSO #2 -->
<!-- Adicionar o item conforme abaixo, no arquivo .js que foi criado o module. Aqui o arquivo é "SeuApp/www/js/app.js", mas pode ser com outro nome -->
<!-- No início: -->