Like button in iOS application

后端 未结 5 1116
忘了有多久
忘了有多久 2020-11-28 06:35

Does anybody know how to place Facebook \"like\" button into iOS application? I\'ve tried the method described in this blog post. But I do not really like this method, becau

相关标签:
5条回答
  • 2020-11-28 06:54

    I like using ShareKit: http://www.getsharekit.com/

    It's not exactly what you're looking for, but still...

    0 讨论(0)
  • 2020-11-28 06:56

    That is actually the only way to do it. There is no special iOS like button. However, the good news is that just today Facebook announced single sign in support for mobile apps. This should remove some of the burden the user faces to log in to facebook.

    0 讨论(0)
  • 2020-11-28 06:58
    - (void)addLikeButton{
    [FBSettings enableBetaFeature:TRUE];
    [FBSettings enablePlatformCompatibility:NO];
     _like = [[FBLikeControl alloc] init];
    _like.frame = CGRectMake(60,12,200,33);
    _like.likeControlAuxiliaryPosition = FBLikeControlAuxiliaryPositionInline;
    _like.likeControlHorizontalAlignment = FBLikeControlHorizontalAlignmentLeft;
    _like.objectID = @"https://www.facebook.com/pages/Strana-Gapra/1377227779244834";
    _like.likeControlStyle = FBLikeControlStyleStandard ;
    [_like addTarget:self action:@selector(onSelect:) forControlEvents:UIControlEventValueChanged];
    [self.likeView addSubview:_like];
    [self performSelector:@selector(getLikeSubviews) withObject:nil afterDelay:0.6];
    

    }

    0 讨论(0)
  • 2020-11-28 06:59

    The only way supported by Facebook on any platform (web, mobile, etc) is from their iFrame code. From iOS, that means embedding a UIWebView into your application with the iFrame code. Note that it does require them to login via Safari.

    0 讨论(0)
  • 2020-11-28 07:06

    It seems there is an agreement on not being able to do this. This question shows you can, as does the FB Graph API documentation:

    You can comment on or like any object that has a /comments or /likes connection by posting to https://graph.facebook.com/OBJECT_ID/comments and https://graph.facebook.com/OBJECT_ID/likes, respectively.

    Unfortunately, according to this question you can’t like a page.

    0 讨论(0)
提交回复
热议问题