2013-04-11 29 views
0

我想分享參數飼料飼料下面通過FBNativeDialog分享FBNativeDialog

NSMutableDictionary *params = [[NSMutableDictionary alloc] initWithObjectsAndKeys: 
            link, @"link", 
            url, @"picture", 
            strText, @"message", 
            @"name", @"name", 
            nil]; 

只見對話框不支持這樣的,但有沒有辦法做到這一點?

P/s:應該使用對話框,然後用戶也可以輸入他們的消息。

回答

0

嘗試SLComposeViewController

SLComposeViewController *composerVC = [SLComposeViewController composeViewControllerForServiceType: 
               SLServiceTypeFacebook]; 
     [composerVC addURL:someUrl]; 
     [composerVC addImage:someImage]; 
     [composerVC setInitialText:someText]; 
0

你可以使用簡單的網絡視圖,並顯示Feed中

NSString *theURL = [NSString stringWithFormat:@"http://www.google.com/"]; 
theURL = [theURL stringByAddingPercentEscapesUsingEncoding: NSUTF8StringEncoding]; 
NSURLRequest *theRequest = [NSURLRequest requestWithURL:[NSURL URLWithString:theURL]]; 
NSURLResponse *resp = nil; 
NSError *err = nil; 
NSData *response; 
response = [NSURLConnection sendSynchronousRequest: theRequest returningResponse: &resp error: &err]; 
if (err != nil) 
{ 
    //write some thing 
} 
else 
{ 
      NSURL *url; 
     url = [NSURL URLWithString: @"https://www.facebook.com/UwMadisonConfessions?fref=ts"]; 



    NSURLRequest *requestObj = [NSURLRequest requestWithURL:url]; 

    [webView loadRequest:requestObj]; 
}