Possible Duplicate:
Like button in iOS application
I'm trying to make it easier for a user of my App to 'Like' my facebook application.
The scenario is, the user has already logged in and authorised my application, so I have the user's oauth token. Since the Graph API does not allow this, I've tried multiple other ways, all unsuccessfully.
Methods: 1) Have it navigate to the facebook application's facebook page in a UIWebView 2) Make my App launch the Facebook App unto my facebook application's page.
In method 1, the main issue is the user will in many cases have to login in the webview again, because I've not found a way to somehow pass the token to the webview session. In the Foursquare api for example, all you need to do is to append the token to the url as a query string, (http://foursquare.com/blabla?access_token=52521....), this doesnt work in facebook.
In method 2, which can be accomplished using this method:
NSString *fbAppUrl = [NSString stringWithFormat:@"fb://applications/%@",[App facebookAppId]];
BOOL didOpenOtherApp = [[UIApplication sharedApplication] openURL:[NSURL URLWithString:fbAppUrl]];
No matter what I try, i.e. fb://applications/%@ or fb://pages/%@ or fb://profile/%@ or fb://feed/%@, the facebook app just opens to a blank page.
Any hints or tips from anyone?
I would love to be able to make use of method 2 and fall back to method 1 if the facebook app is not installed, but in essence, method 1 will result in a very low conversion rate, so hoping to avoid it.
Facebook iPhone app doesn't currently support that, nor does the graph api. The only way supported by Facebook to "like" a url is from their iFrame code. There is a halfway decent blog post on how to do a variation of option #1 but looks to see if they are logged into Facebook via Safari. Not the best user experience, but all that Facebook allows at the moment.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With