Skip to content

Commit ea0a816

Browse files
Merge pull request #12 from NativeScript/update-readme
* Reflect changes from latest merge into README file
2 parents 1ce725f + 02cb91d commit ea0a816

File tree

2 files changed

+6
-9
lines changed

2 files changed

+6
-9
lines changed

README.md

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ main-page.xml
9191

9292
...
9393

94-
<Facebook:LoginButton onLogin="{{ onLogin }}"></Facebook:LoginButton>
94+
<Facebook:LoginButton login="{{ onLogin }}"></Facebook:LoginButton>
9595

9696
...
9797

@@ -101,7 +101,6 @@ main-page.xml
101101
main-view-model.ts
102102
```TypeScript
103103
import { Observable } from 'data/observable';
104-
let Facebook = require('nativescript-facebook');
105104

106105
export class HelloWorldModel extends Observable {
107106

@@ -131,14 +130,12 @@ main-page.xml
131130
main-view-model.ts
132131
```TypeScript
133132
import { Observable } from 'data/observable';
134-
let Facebook = require('nativescript-facebook');
133+
import { login } from "nativescript-facebook";
135134

136135
export class HelloWorldModel extends Observable {
137136

138137
public testAction() {
139-
Facebook.login((error, data) => {
140-
console.log("Success!");
141-
});
138+
login((error, data) => console.log("Success!"));
142139
}
143140

144141
}
@@ -167,7 +164,7 @@ application.on(application.launchEvent, function (args) {
167164
app.component.html
168165
```html
169166
<StackLayout>
170-
<FacebookLoginButton [onLogin]="onLogin"></FacebookLoginButton>
167+
<FacebookLoginButton [login]="onLogin"></FacebookLoginButton>
171168
</StackLayout>
172169
```
173170

@@ -198,7 +195,7 @@ app.component.html
198195
app.component.ts
199196
```TypeScript
200197
import { Component } from "@angular/core";
201-
import { LoginResponse } from "nativescript-facebook";
198+
import * as Facebook from "nativescript-facebook";
202199

203200
@Component({
204201
selector: "ns-app",

src/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
"bugs": {
4545
"url": "https://github.com/angeltsvetkov/nativescript-facebook/issues"
4646
},
47-
"license": "MIT",
47+
"license": "Apache 2.0",
4848
"homepage": "https://github.com/angeltsvetkov/nativescript-facebook",
4949
"readmeFilename": "README.md",
5050
"devDependencies": {

0 commit comments

Comments
 (0)