我想只添加Facebook Like按钮(不计数等)。是否可以在不显示$([selector]).qTip({
events: {
show: function() {
$([selector]).qtip('api').set('hide.event', 'mouseleave');
)
}
});
的情况下添加Facebook按钮?
答案 0 :(得分:2)
我尝试解决这个问题,为此我创建了一个类似Facebook SDK的likeButton的子类:FBSDKLikeControlOnly
:
FBSDKLikeControlOnly.h
#import "FBSDKLikeControl.h"
@interface FBSDKLikeControlOnly : FBSDKLikeControl
@end
FBSDKLikeControlOnly.m
@implementation FBSDKLikeControlOnly
- (UIView *)_auxiliaryView {
return nil;
}
@end
之后,在viewController中,您可以使用这个新控制器:
FBSDKLikeControlOnly *likeButton = [[FBSDKLikeControlOnly alloc] init];
[likeButton setLikeControlStyle:FBSDKLikeControlStyleBoxCount];
[likeButton.objectID = @"https://www.facebook.com/FacebookDevelopers";
likeButton.center = self.view.center;
[self.view addSubview:likeButton];
我希望这对你有所帮助。