[TIMOB-18712] Facebook module: upgrade iOS Facebook SDK and improve requestDialog
| GitHub Issue | n/a | 
|---|---|
| Type | Improvement | 
| Priority | High | 
| Status | Closed | 
| Resolution | Fixed | 
| Resolution Date | 2015-04-21T02:59:14.000+0000 | 
| Affected Version/s | n/a | 
| Fix Version/s | Release 4.1.0 | 
| Components | Android, iOS | 
| Labels | n/a | 
| Reporter | Chee Kiat Ng | 
| Assignee | Eric Merriman | 
| Created | 2015-03-18T04:56:20.000+0000 | 
| Updated | 2017-03-20T18:09:47.000+0000 | 
Description
	There is a request on github that we should expose the 'resultURL' from presentRequestDialog method. 
Also, we should upgrade the Facebook sdk in the iOS module from 3.21.1 to 3.23.1.
var fb = require('facebook');
var win = Ti.UI.createWindow({
	title: 'RequestDialog',
	backgroundColor:'#fff',
	fullscreen: false
});
var requestDialog = Ti.UI.createButton({
	title: 'Request Dialog',
	top: 180, left: 10, right: 10, height: 40
});
requestDialog.addEventListener('click', function() {
	fb.presentSendRequestDialog( 
		{message: 'Go to https://appcelerator.com/'}, 
		{data:
        "{\"badge_of_awesomeness\":\"1\"," +
        "\"social_karma\":\"5\"}"});
});
fb.addEventListener('requestDialogCompleted', function(e) {
	if (e.success) {
		alert('Request dialog completed. Returned URL is ' + e.resultURL);
	}
	else if (e.cancelled) {
		alert('Request dialog cancelled');
	}
	else {
		alert('error ' + e.error);           
	}
});
win.add(requestDialog);
win.open();
Done during HackNight! PR here: https://github.com/appcelerator-modules/ti.facebook/pull/7 [~msamah], please help with the android component.
Will do.
Facebook iOS SDK has upgraded to version 4.0.1 on April 2nd 2015. To be considered for this improvement.
[~cng] This resultURL also has the recipient user IDs as described [here](https://developers.facebook.com/docs/games/requests/v2.2#response) right? I could really use this update, for Android as well. Any eta on it?
[~fokkezb] just merged the pr. https://github.com/appcelerator-modules/ti.facebook/pull/12 yes the resultURL returns the recipient user iDs.
[~cng] excellent, how about Android? ;)
It's there too sir
[~cng] A sorry, I was mislead by the title of the PR which only spoke about Android. Awesome!, I'll give it a try.
Closing ticket as fixed.