Skip to content

Commit

Permalink
feat: update sdk's to 4.39.0 (#97)
Browse files Browse the repository at this point in the history
* chore: remove deprecated / unused LikeButton control

* feat(ios): update Facebook SDK to 4.38.0

Note: There is a 4.39.0 as well, but it introduced an encoding bug that prevents logins. Waiting for a patch until 4.39.x can be used.

* feat(android): update Facebook SDK to 4.39.0

* feat(ios): update Facebook SDK to 4.39.0

* chore: use official iOS SDK 4.9.1

* chore: manual app activation not needed anymore

[WARN]  W/com.facebook.appevents.AppEventsLogger: activateApp events are being logged automatically. There's no need to call activateApp explicitly, this is safe to remove.
[WARN]  W/com.facebook.appevents.AppEventsLogger: deactivateApp events are being logged automatically. There's no need to call deactivateApp, this is safe to remove.

* Update Jenkinsfile

* fix build
  • Loading branch information
hansemannn authored and janvennemann committed Feb 13, 2019
1 parent a5549d5 commit 3f10c4a
Show file tree
Hide file tree
Showing 126 changed files with 2,391 additions and 1,810 deletions.
2 changes: 1 addition & 1 deletion Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
buildModule {
// defaults:
// nodeVersion = '8.2.1' // Must have version set up on Jenkins master before it can be changed
sdkVersion = '7.2.0.GA' // use a master build with ARM64 support
sdkVersion = '7.4.2.GA' // use a master build with ARM64 support
// androidAPILevel = '23' // if changed, must install on build nodes
}
18 changes: 0 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -390,24 +390,6 @@ See official Facebook Dialogs documentation for more details.
});
```
Like Button
---
We can create a Like button just like any other view, with specific parameters documented in Facebook docs. Note there is no completion callback or event, and Facebook policies state "If you use the Like button on iOS or Android, don’t collect or use any information from it."
```javascript
var fb = require('facebook');
var likeButton = fb.createLikeButton({
objectId: "https://www.facebook.com/appcelerator", // URL or Facebook ID
foregroundColor: "white", // A color in Titanium format - see Facebook docs
likeViewStyle: 'box_count', // standard, button, box_count - see FB docs
auxiliaryViewPosition: 'inline', // bottom, inline, top - see FB docs
horizontalAlignment: 'left', // center, left, right - see FB docs,
soundEnabled: true // boolean, iOS only
});
win.add(likeButton);
```
Messenger Button
---
Expand Down
18 changes: 0 additions & 18 deletions android/example/facebook_publish_stream.js
Original file line number Diff line number Diff line change
Expand Up @@ -172,23 +172,5 @@ exports.window = function(value){
actionsView.add(requestDialog);
win.add(actionsView);

var likeButton = fb.createLikeButton({
top: 230,
height: "50%", // Note: on iOS setting Ti.UI.SIZE dimensions prevented the button click
width: "50%",
objectID: "https://www.facebook.com/appcelerator", // URL or Facebook ID
foregroundColor: "white", // A color in Titanium format - see Facebook docs
likeViewStyle: 'box_count', // standard, button, box_count - see FB docs
auxiliaryViewPosition: 'inline', // bottom, inline, top - see FB docs
horizontalAlignment: 'left', // center, left, right - see FB docs,
soundEnabled: true // boolean, iOS only
});

if (Ti.Platform.osname == 'android') {
likeButton.height = Ti.UI.SIZE;
likeButton.width = Ti.UI.SIZE;
}
win.add(likeButton);

return win;
};
Binary file modified android/lib/facebook-applinks.aar
Binary file not shown.
Binary file modified android/lib/facebook-common.aar
Binary file not shown.
Binary file modified android/lib/facebook-core.aar
Binary file not shown.
Binary file modified android/lib/facebook-login.aar
Binary file not shown.
Binary file modified android/lib/facebook-messenger.aar
Binary file not shown.
Binary file modified android/lib/facebook-places.aar
Binary file not shown.
Binary file modified android/lib/facebook-share.aar
Binary file not shown.
Binary file modified android/lib/facebook.aar
Binary file not shown.
2 changes: 1 addition & 1 deletion android/manifest
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# this is your module manifest and used by Titanium
# during compilation, packaging, distribution, etc.
#
version: 7.3.1
version: 8.0.0
apiversion: 4
architectures: arm64-v8a armeabi-v7a x86
description: facebook
Expand Down
55 changes: 0 additions & 55 deletions android/src/facebook/LikeButtonProxy.java

This file was deleted.

122 changes: 0 additions & 122 deletions android/src/facebook/LikeButtonView.java

This file was deleted.

14 changes: 0 additions & 14 deletions android/src/facebook/TiFacebookModule.java
Original file line number Diff line number Diff line change
Expand Up @@ -171,20 +171,6 @@ public static TiFacebookModule getFacebookModule()
return module;
}

@Override
public void onResume(Activity activity)
{
super.onResume(activity);
AppEventsLogger.activateApp(activity);
}

@Override
public void onPause(Activity activity)
{
super.onPause(activity);
AppEventsLogger.deactivateApp(activity);
}

public CallbackManager getCallbackManager()
{
return callbackManager;
Expand Down
51 changes: 0 additions & 51 deletions apidoc/Facebook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,6 @@ description: |
* Making requests through the Facebook Graph API v3 using the
[requestWithGraphPath()](Modules.Facebook.requestWithGraphPath) method.
* Sharing content using Facebook dialogs or the [Like button](Modules.Facebook.LikeButton).
**Using Ti.Facebook with iOS 10 and Xcode 8**
The paragraph about custom capabilities was only necessary between Titanium SDK 5.5.0 and 6.0.0.
Since 6.0.1.GA, we add the required capabilities automatically, so you don't need to curate your
own entitlements file anymore, which will avoid possible issues with concurring values. Please
ensure to use both SDK and CLI 6.0.1 (or later).
## Getting Started
To use the Facebook module, you need a Facebook application. To create a Facebook App,
Expand Down Expand Up @@ -416,22 +407,6 @@ description: |
win.add(messengerButton);
For more information, see the [MessengerButton API reference](Modules.Facebook.MessengerButton).
### Like Button
The Like button provides a quick mechanism for users to share content. A click on the button
will share the content on the user's Facebook page.
To create a Like button, call the [createLikeButton()](Modules.Facebook.createLikeButton) method
and pass it a dictionary with the `objectID` assigned to either a URL or Open Graph object ID
you want to share. Add the button instance to a view to display it.
var likeButton = fb.createLikeButton({
objectID: "https://www.facebook.com/appcelerator"
});
win.add(likeButton);
For more information, see the [LikeButton API reference](Modules.Facebook.LikeButton).
### Fetch Places
Expand Down Expand Up @@ -1478,32 +1453,6 @@ properties:

examples:

- title: Alloy Example
example: |
Displays the Facebook Login and Like buttons in a window.
`app/alloy.js`:
// Make API calls to Alloy.Globals.Facebook
Alloy.Globals.Facebook = require('facebook');
`app/views/index.xml`:
<Alloy>
<Window backgroundColor="white">
<LoginButton id="fbLogin" module="facebook" top="25" />
<LikeButton id="fbLike" module="facebook" top="100" />
</Window>
</Alloy>
`app/controllers/index.js`:
$.fbLike.objectID = "http://www.facebook.com/appcelerator";
if (OS_ANDROID) {
$.index.fbProxy = Alloy.Globals.Facebook.createActivityWorker({lifecycleContainer: $.index});
}
$.index.open();
- title: Authorize
example: |
Expand Down
4 changes: 4 additions & 0 deletions apidoc/LikeButton.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,10 @@ examples:
win.add(likeButton);
since: "4.0.0"
deprecated:
since: "6.0.0"
removed: "6.0.0"
notes: The API was removed by the Facebook SDK 4.x and up.
platforms: [android, iphone, ipad]
extends: Titanium.UI.View
properties:
Expand Down
20 changes: 0 additions & 20 deletions example/facebook_share.js
Original file line number Diff line number Diff line change
Expand Up @@ -114,25 +114,5 @@ exports.window = function (value) {
actionsView.add(requestDialog);
win.add(actionsView);

var likeButton = fb.createLikeButton({
top: '10%',
height: '50%', // Note: on iOS setting Ti.UI.SIZE dimensions prevented the button click
width: '50%',
center: true,
objectID: 'https://www.facebook.com/appcelerator', // URL or Facebook ID
foregroundColor: 'white', // A color in Titanium format - see Facebook docs
likeViewStyle: 'box_count', // standard, button, box_count - see FB docs
auxiliaryViewPosition: 'inline', // bottom, inline, top - see FB docs
horizontalAlignment: 'left', // center, left, right - see FB docs,
soundEnabled: true // boolean, iOS only
});

if (Ti.Platform.osname === 'android') {
likeButton.height = Ti.UI.SIZE;
likeButton.width = Ti.UI.SIZE;
}

actionsView.add(likeButton);

return win;
};
Loading

0 comments on commit 3f10c4a

Please sign in to comment.