Possible duplicate:
Like a button in an iOS app
I am trying to make it easier for the user of my application to βlikeβ my facebook application.
Scenario: the user is already logged in and authorized my application, so I have the oauth user token. Since the Graph API does not allow this, I tried several other methods, all to no avail.
Methods: 1) Go to the facebook page on facebook in UIWebView 2) Make your application to launch the Facebook application on my facebook application page.
In method 1, the main problem is that in many cases the user will have to log into the web view again, because I did not find a way to somehow transfer the token to the web browsing session. For example, in the Foursquare api, all you have to do is add a token to the URL as a query string ( http: //foursquare.com/blabla? Access_token = 52521 .... ), This does not work on facebook.
In method 2, which can be performed 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 application just opens to a blank page.
Any hints or tips from anyone?
I would really like to use method 2 and return to method 1 if the facebook application is not installed, but in fact, method 1 will lead to a very low conversion speed, so we hope to avoid this.