Reputation: 229
In my application i am using Facebook SDK,
I have a mark as favourite button on my view
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];
Now i am trying to make a share button so that it should share the specific URL on Fb that is on the view, lik the view has www.my-website.com/key-chain this URL I am storing the Url in NSMutableString * url_selected
so by clicking the share button i want that it should take that particular Url and share that URL on Fb,
can any one please tell me how to coding for the Fb share button inside my application... ?
Upvotes: 0
Views: 3905
Reputation: 8256
You can use share kit for FB sharing like url,text. install latest share kit & implement it.
Its easy be implemented.
Upvotes: 3
Reputation: 12051
If you're using iOS6, try the Social Framework included in the iOS SDK with a tutorial available here - http://www.mobile.safilsunny.com/integrating-facebook-ios-6/
Upvotes: 1