I am trying to use FBSDKLikeControl / FBSDKLikeButton to let users like my Fan Page.
I tried in their sample code and it works on any Fan Pages. However, when I change the FacebookAppID into mine, it breaks. When I click the Like Button, the app navigates me to Facebook app and then switches back immediately.
- (void)viewDidLoad
{
[super viewDidLoad];
self.pageLikeControl.likeControlAuxiliaryPosition = FBSDKLikeControlAuxiliaryPositionBottom;
self.pageLikeControl.likeControlHorizontalAlignment = FBSDKLikeControlHorizontalAlignmentCenter;
self.pageLikeControl.objectID = @"burgerking";
}
plist file settings: When I change above URL Schemes and FacebookAppID, the like function will fail.
Is it a permission problem on my app setting? I have not submitted any items to review yet as such login permission("public_actions").
Many Thanks!
Yes, You have to register your app with Facebook Developer and for now u no need to review your iOS app to Facebook as its in developing mode.
As u register your app with Facebook you will get instruction how to config your .plist of iOS app for connect with facebook.
Example Code :
FBSDKLikeControl *button = [[FBSDKLikeControl alloc] init];
button.objectID = @"https://www.facebook.com/FacebookDevelopers";
[self.view addSubview:button];
In the above code u just have to replace button.objectID Value with your Facebook post/page URL. I hope this will be Help full to u.
For More Refer : https://developers.facebook.com/docs/sharing/ios
이 기사는 인터넷에서 수집됩니다. 재 인쇄 할 때 출처를 알려주십시오.
침해가 발생한 경우 연락 주시기 바랍니다[email protected] 삭제
몇 마디 만하겠습니다