[英]While posting on Facebook in IOS I am getting error
我是iPhone應用程序開發的新手。 在Facebook上發帖時我收到錯誤說please try again
。
請幫我解決這個問題
- (void)ToPostOnFB
{
NSMutableDictionary *dic=[[NSMutableDictionary alloc]init];
NSString *scoreBoard = [[NSString alloc]init];
clsChat *cls=[[clsChat alloc] init];
cls=[self.aryUserChat objectAtIndex:0];
NSString *ch= [(AppObj) removeApostropheFromString:cls.clsChatMsg callingType:@"fetch"];
score = [NSString stringWithFormat:@"%@ \n%@ %@ \n%@ %@",self.lblPeriod.text,self.lbl1.text,self.lbl2.text,self.lbl3.text,self.lbl4.text];
NSString *c = [NSString stringWithFormat:@"Post: \n%@ \nGet the app to follow your favorite teams https://goo.gl....", ch];
NSString *title = [NSString stringWithFormat:@"Post 2: \n%@ \nGet the app to follow your favorite teams https://goo.gl...\n\n%@", score,c];
dic= [NSMutableDictionary dictionaryWithObjectsAndKeys:title,@"message",nil];
NSLog(@"%@",dic);
[FBRequestConnection startWithGraphPath:@"/me/feed"
parameters:dic
HTTPMethod:@"POST"
completionHandler:^(FBRequestConnection *connection, id result, NSError *error) {
if (!error) {
// Link posted successfully to Facebook
NSLog(@"result: %@", result);
UIAlertView *alertShare = [[UIAlertView alloc] initWithTitle:@"" message:@"Shared Successfully" delegate:self cancelButtonTitle:@"OK" otherButtonTitles:nil];
[alertShare show];
} else {
UIAlertView *alertShare = [[UIAlertView alloc] initWithTitle:@"" message:@"Please try again" delegate:self cancelButtonTitle:@"OK" otherButtonTitles:nil];
[alertShare show];
NSLog(@"%@", error.description);
}
}];
}
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.