[英]Facebook Share Button for iphone
In my application i am using Facebook SDK, 在我的应用程序中,我正在使用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 现在,我试图创建一个共享按钮,以便它应该在视图上的Fb上共享特定的URL,如果视图具有www.my-website.com/key-chain这个URL,我会将 Url存储在NSMutableString中* url_selected
so by clicking the share button i want that it should take that particular Url and share that URL on Fb, 因此,通过单击共享按钮,我希望它应使用特定的网址并在Fb上共享该URL,
can any one please tell me how to coding for the Fb share button inside my application... ? 谁能告诉我如何在我的应用程序中为Fb共享按钮编码...?
如果您使用的是iOS6,请尝试使用iOS SDK中包含的社交框架以及此处提供的教程-http: //www.mobile.safilsunny.com/integrating-facebook-ios-6/
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.