IOS 6 - Like button for Facebook

I just implemented Facebook SDK 3.1.1 in my application in order to be able to share the photo, as well as the "How" to our product page from the application. I can’t find a simple explanation or tutorial on how to encode a button to automatically “like” a particular Facebook page. Can this be done only in UIWebView? Can someone point me in the right direction? Thanks.

+4
source share
4 answers

Unfortunately not. The only way to like a Facebook page from an iOS application is to download a UIWebView that moves to the page, and then the user may like it.

+1
source

Through Vishal's answer, I came to this link, which can create an iFrame Like button that can be added to the UIWebView.

Build like a crate

0
source

Now you can use the FB button using the following code, but it needs to download the latest sdk, and this is a beta version :(

Here is the code:

 [FBSettings enableBetaFeature:FBBetaFeaturesLikeButton]; [FBSettings enablePlatformCompatibility:NO]; FBLikeControl *like = [[FBLikeControl alloc] init]; like.objectID = @"http://shareitexampleapp.parseapp.com/photo1/"; like.likeControlHorizontalAlignment=FBLikeControlHorizontalAlignmentRight; like.likeControlStyle=FBLikeControlStyleBoxCount; [self.view addSubview like]; 
0
source

All Articles