Created
October 3, 2011 17:06
-
-
Save jonalter/1259610 to your computer and use it in GitHub Desktop.
Facebook: likes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Titanium.Facebook.requestWithGraphPath('OBJECT_ID', {}, 'GET', function(e) { | |
if (e.success) { | |
alert(e.result); | |
} else { | |
return -1; | |
} | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// facebook's documentation http://developers.facebook.com/docs/reference/api/ | |
// Change OBJECT_ID to an actual object id | |
Titanium.Facebook.requestWithGraphPath('OBJECT_ID/likes', {}, 'POST', function(e) { | |
if (e.success) { | |
alert('Success! From FB: ' + e.result); | |
} else { | |
if (e.error) { | |
alert(e.error); | |
} else { | |
alert('Unkown result'); | |
} | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment