在我的应用程序中,我使用 Facebook SDK,
我的视图上有一个标记为收藏按钮
UIImage *favNormal = [UIImage imageNamed:@"Fav_normal"];
UIImage *favPressed = [UIImage imageNamed:@"Fav_pressed"];
[favButton setImage:favNormal forState:UIControlStateNormal];
[favButton setImage:favPressed forState:UIControlStateHighlighted];
favButton.frame = CGRectMake(0, 0, favNormal.size.width, favNormal.size.height);
// favButton.center = CGPointMake(190, 70);
favButton.center = CGPointMake(85+(favNormal.size.width/2), 73);
[headView addSubview:favButton];
favButton.enabled = NO;
ASIFormDataRequest *request = [ProjectServerRequests ASIFormDataRequestForSrcipt:@"isFavorite"];
[request setPostValue:[NSString stringWithFormat:@"%d", Id] forKey:@"sid"];
[request setCompletionBlock:^{
NSString *response = [request responseString];
NSLog(@"isFavorite response: %@", response);
if([response isEqualToString:@"yes"]) {
[favButton setImage:[UIImage imageNamed:@"Fav_normal"] forState:UIControlStateNormal];
[fav setImage:[UIImage imageNamed:@"Fav_pressed"] forState:UIControlStateHighlighted];
}
favoriteButton.enabled = YES;
}];
[request startAsynchronous];
现在我正在尝试制作一个共享按钮,以便它应该在 Fb 上共享视图上的特定 URL,就像视图有 www.my-website.com/key-chain这个 URL 我将 Url 存储在NSMutableString * url_selected
因此,通过单击共享按钮,我希望它应该采用该特定 URL 并在 Fb 上共享该 URL,
谁能告诉我如何为我的应用程序中的 Fb 分享按钮编码...?