Skip to content

Commit 3e7b1df

Browse files
authored
Merge pull request #444 from tidev/android18
feat(android): update to 18.0.3
2 parents eec61dc + 5d165eb commit 3e7b1df

File tree

5 files changed

+6
-55
lines changed

5 files changed

+6
-55
lines changed

README.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -294,11 +294,9 @@ To share more information, example:
294294
295295
```javascript
296296
var fb = require('facebook');
297+
fb.initialize();
297298
fb.presentShareDialog({
298299
link: 'https://appcelerator.com/',
299-
title: 'great product',
300-
description: 'Titanium is a great product',
301-
picture: 'http://www.appcelerator.com/wp-content/uploads/scale_triangle1.png'
302300
});
303301
```
304302

android/build.gradle

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,6 @@ buildscript {
66
}
77

88
dependencies {
9-
implementation 'com.facebook.android:facebook-android-sdk:17.0.2'
9+
// https://github.com/facebook/facebook-android-sdk/releases
10+
implementation 'com.facebook.android:facebook-android-sdk:18.0.3'
1011
}

android/manifest

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# this is your module manifest and used by Titanium
33
# during compilation, packaging, distribution, etc.
44
#
5-
version: 13.0.0
5+
version: 14.0.0
66
apiversion: 4
77
architectures: arm64-v8a armeabi-v7a x86 x86_64
88
description: facebook
@@ -15,4 +15,4 @@ name: Facebook
1515
moduleid: facebook
1616
guid: e4f7ac61-1ee7-44c5-bc27-fa6876e2dce9
1717
platform: android
18-
minsdk: 11.0.0
18+
minsdk: 12.7.0

android/src/facebook/TiFacebookModule.java

Lines changed: 1 addition & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -252,26 +252,6 @@ public static String handleError(FacebookRequestError error)
252252
return errorMessage;
253253
}
254254

255-
// clang-format off
256-
@Kroll.getProperty
257-
@Kroll.method
258-
public boolean getCanPresentShareDialog()
259-
// clang-format on
260-
{
261-
Log.w(TAG, "The getCanPresentShareDialog property is deprecated. This always returns true.");
262-
return true;
263-
}
264-
265-
// clang-format off
266-
@Kroll.getProperty
267-
@Kroll.method
268-
public boolean getCanPresentOpenGraphActionDialog()
269-
// clang-format on
270-
{
271-
Log.w(TAG, "The getCanPresentOpenGraphActionDialog property is deprecated. This always returns true.");
272-
return true;
273-
}
274-
275255
@Kroll.method
276256
public void requestWithGraphPath(String path, KrollDict params, String httpMethod, final KrollFunction callback)
277257
{
@@ -540,13 +520,8 @@ public void setPermissions(Object[] permissions)
540520
}
541521

542522
@Kroll.method
543-
public void initialize(@Kroll.argument(optional = true) int timeout)
523+
public void initialize()
544524
{
545-
// Variable `timeout` is not used
546-
// When not set, timeout is -1
547-
if (timeout >= 0) {
548-
Log.w(TAG, "Property `timeout` is deprecated. It is not used.");
549-
}
550525
callbackManager = CallbackManager.Factory.create();
551526
facebookCallback = new FacebookCallback<LoginResult>() {
552527
final KrollDict data = new KrollDict();
@@ -766,24 +741,9 @@ public void onSuccess(Sharer.Result results)
766741
Mode mode = Mode.AUTOMATIC;
767742

768743
String link = (String) args.get("link");
769-
String title = (String) args.get("title");
770-
String description = (String) args.get("description");
771-
String picture = (String) args.get("picture");
772744
String placeId = (String) args.get("placeId");
773745
String ref = (String) args.get("ref");
774746

775-
if (title != null) {
776-
Log.w(TAG, "Ti.Facebook.presentShareDialog.title has been deprecated as of the Graph v2.9 changes.");
777-
}
778-
779-
if (description != null) {
780-
Log.w(TAG, "Ti.Facebook.presentShareDialog.description has been deprecated as of the Graph v2.9 changes.");
781-
}
782-
783-
if (picture != null) {
784-
Log.w(TAG, "Ti.Facebook.presentShareDialog.picture has been deprecated as of the Graph v2.9 changes.");
785-
}
786-
787747
switch (TiConvert.toInt(args.get("mode"), TiFacebookModule.SHARE_DIALOG_MODE_AUTOMATIC)) {
788748
case TiFacebookModule.SHARE_DIALOG_MODE_NATIVE:
789749
mode = Mode.NATIVE;

android/timodule.xml

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,5 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<ti:module xmlns:ti="http://ti.appcelerator.org" xmlns:android="http://schemas.android.com/apk/res/android">
3-
<!--
4-
Similar to tiapp.xml, but contains module/platform specific
5-
configuration in <iphone>, <android>, and <mobileweb> sections
6-
-->
7-
<iphone>
8-
</iphone>
93
<android xmlns:android="http://schemas.android.com/apk/res/android">
104
</android>
11-
<mobileweb>
12-
</mobileweb>
135
</ti:module>

0 commit comments

Comments
 (0)