简体   繁体   中英

FBLikeControl does not open Facebook app

I have implemented FBLikeControl on ios. Now if I login to app with Facebook login and Facebook app is installed in my device it always opens page in Safari instead of Facebook app.

I have used following code for the like

FBLikeControl *like = [[FBLikeControl alloc] init];
like.likeControlHorizontalAlignment = FBLikeControlHorizontalAlignmentCenter;
like.objectID = @"https://www.facebook.com/***my page***";
like.objectType = FBLikeControlObjectTypePage;
like.preferredMaxLayoutWidth = 400.0f;
like.likeControlStyle = FBLikeControlStyleBoxCount;
[self.view addSubview:like];

正如@MingLi所评论的那样,如果设备上支持受支持的版本,则FBLikeControl将仅打开Facebook应用程序。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM