With the new release of facebook ios sdk, the documentation is talking about the facebook like control, that allows to like a page. https://developers.facebook.com/docs/ios/like
Mawoon answered worked for me. Thank you sir.
Usage example:
[FBSettings enableBetaFeature:FBBetaFeaturesLikeButton];
[FBSettings enablePlatformCompatibility:NO];
FBLikeControl *like = [[FBLikeControl alloc] init];
like.frame = CGRectMake(itemX, itemY, 60, 20);
like.likeControlStyle = FBLikeControlStyleButton;
like.objectID = @"http://shareitexampleapp.parseapp.com/photo1/";
For some reason I'm not being able to set the 'size' of the like button, also changing the value of the likeControlStyle is not yielding any results, could be because its still a preview feature.
As mentioned here its currently only preview feature, please check screenshot. My best guess is you may not have enabled developers in Facebook applications you created through app page.
You can not change the size of button because its standard button provided by fb but you can use button style using below code:
Here is the complete 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];
You can use FBlikeControl button by enabling below feature in viewdidload or where you create FBlikeControl button:
[FBSettings enableBetaFeature:FBBetaFeaturesLikeButton];
[FBSettings enablePlatformCompatibility:NO];