[TIMOB-17840] Facebook SDK: Native Like Button
| GitHub Issue | n/a |
|---|---|
| Type | New Feature |
| Priority | Medium |
| Status | Closed |
| Resolution | Fixed |
| Resolution Date | 2016-08-27T13:01:26.000+0000 |
| Affected Version/s | Release 3.4.0 |
| Fix Version/s | Backlog |
| Components | iOS |
| Labels | TCSupport, facebook, likebutton, module |
| Reporter | Hans Knöchel |
| Assignee | Eric Merriman |
| Created | 2014-10-10T10:34:35.000+0000 |
| Updated | 2017-03-21T18:35:17.000+0000 |
Description
The native Like Button of the Facebook SDK just gone from beta to GA and can now be used in any production app using the latest Facebook SDK. A proxy method like fb.createLikeView() would be a great addition to the existing Facebook module!
More infos:
- iOS: https://developers.facebook.com/docs/ios/like-button/
- Android https://developers.facebook.com/docs/android/like-button/
Working iOS module wrapping this feature: https://github.com/timanrebel/Facebook/tree/master/iphone/Classes
Fixed in the 4.0.0 version of the module (https://github.com/appcelerator-modules/ti.facebook) Documentation is not available yet, please refer to this sample code:
var likeButton = fbModule.createLikeButton({ top: 10, height: "50%", // Note: on iOS setting Ti.UI.SIZE dimensions prevented the button click width: "50%", objectId: "https://www.facebook.com/NYKnicks", // 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, objectType: 'page', // iOS only, 'page', 'openGraphObject', or 'unknown' - see FB docs soundEnabled: true // boolean, iOS only }); someView.add(likeButton);Closing ticket as fixed.