2013-01-18 60 views

回答

0

如果要張貼到牆上的用戶嘗試這一個:在用戶的個人資料頁面顯示

NSMutableDictionary *postTest = [[NSMutableDictionary alloc]init]; 
    [postTest setObject:[NSString stringWithForm[email protected]"Your message"] forKey:@"message"]; 
    [postTest setObject:@"" forKey:@"picture"]; 
    [postTest setObject:@"" forKey:@"name"]; 
    [postTest setObject:@"APPID" forKey:@"app_id"]; 
    NSString *userFBID =[NSString stringWithFormat:@"%@",[allInfoDict objectForKey:@"Friends facebook ID "]]; 

    [FBRequestConnection startWithGraphPath:[NSString stringWithFormat:@"%@/feed?access_token=%@",userFBID,[appDelegate.mysession accessToken]] 
           parameters:postTest 
           HTTPMethod:@"POST" 
          completionHandler:^(FBRequestConnection *connection, 
               NSDictionary * result, 
               NSError *error) { 
           if (error) { 
            [self hideHUD]; 
            NSLog(@"Error: %@", [error localizedDescription]); 

           } else { 
            // Success 

           } 
          }]; 

    [postTest release]; 
+0

發佈的消息,但我想它在用戶的主頁(我的意思是在新聞饋送/消息)。 – ggg

相關問題