Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-11049] iOS: Ti.Facebook.dialog feed broken for large description texts.

GitHub Issuen/a
TypeBug
PriorityLow
StatusClosed
ResolutionFixed
Resolution Date2016-08-27T12:33:08.000+0000
Affected Version/sRelease 2.1.2, Release 2.1.3, Release 3.0.0, Release 3.1.0
Fix Version/sBacklog
ComponentsiOS
Labelsn/a
ReporterYgor Lemos
AssigneeEric Merriman
Created2012-09-20T03:49:23.000+0000
Updated2017-03-21T18:31:53.000+0000

Description

When I use a large description text inside Ti.Facebook.dialog("feed"), it displays some unescaped / uninterpreted html data throughout the text. I'm not exactly sure if this is a Titanium Mobile bug or the bug lies within the Facebook SDK version used under the Ti Module itself. Sample Code:
var win = Ti.UI.createWindow();

Titanium.Facebook.appid = '187692147928682';
Titanium.Facebook.permissions = ['publish_stream'];

var postToFeed = function(e) {
	var data = {
		link : "http://airportchatter.com",
		name : "AirportChatter",
		message : "Hey! Checkout AirportChatter when you're on an airport!",
		caption : "Know Before You Go!",
		picture : "http://www.airportchatter.com/images/airportchatter-logo-alpha.png",
		description : "AirportChatter guides you through all venues, services, terminals and security on all major airports in the world!" + "<br/>It also give you the best deals, discount coupons, updated user reviews on venues, services and lounges." + "<br/>we can also help you to make friends on airports and terminals during your layover using our awesome Radar feature!"
	};
	Titanium.Facebook.dialog("feed", data, function(e) {
		if (e.success && e.result) {
			alert("Success! New Post ID: " + e.result);
		} else {
			if (e.error) {
				alert(e.error);
			} else {
				alert("User canceled dialog.");
			}
		}
	});
};

var postButton = Ti.UI.createButton({
	title : 'Post',
	height : 60,
	width : 200,
	top : 200
});
postButton.addEventListener('click', function(e) {
	postToFeed();
});

win.add(postButton);

win.open();
It shows the text, and after a certain amount of chars it shows the html code (not interpreted):
<span class="text_exposed_hide">...</span><div class="text_exposed_show">rest of the text...</div>
Follows an image attached with the output...

Attachments

FileDateSize
Screen Shot 2012-09-20 at 7.36.19 AM.png2012-09-20T03:49:23.000+0000150570

Comments

  1. Daniel Sefton 2012-09-21

    Tested and confirmed on iOS 5.1, iOS 6.0, TiSDK 2.1.2 GA, 2.1.3 RC and 3.0.0.
  2. jithinpv 2013-04-09

    Issue reproduces Tested with Titanium Studio, build: 3.0.1.201212181159 Titanium SDK version: 3.1.0 Titanium SDK version: 3.0.2 iOS iPhone Simulator: iOS SDK version: 6.0
  3. Hans Knöchel 2016-08-27

    Fixed in Ti.Facebook 5.0.0 and later using the presentShareDialog method.
  4. Lee Morris 2017-03-21

    Closing ticket as fixed.

JSON Source