你可以做這樣的事情:
NSURL *url = [NSURL URLWithString:@"https://graph.facebook.com/me/feed"];
ASIFormDataRequest *newRequest = [ASIFormDataRequest requestWithURL:url];
[newRequest setPostValue:message forKey:@"message"];
[newRequest setPostValue:accessToken forKey:@"access_token"];
[newRequest setPostValue:imageURL forKey:@"picture"];
[newRequest setPostValue:attachmentName forKey:@"name"];
[newRequest setPostValue:attachmentCaption forKey:@"caption"];
[newRequest setPostValue:attachmentDescription forKey:@"description"];
[newRequest setPostValue:href forKey:@"link"];
//[newRequest setPostValue:@"http://www.foo.com/bar.swf" forKey:@"source"];
[newRequest setDidFinishSelector:@selector(postToWallFinished:)];
[newRequest setDelegate:self];
[newRequest startAsynchronous];
,也可以設置在元的參數共享的ressource的標籤:
NSURL *url = [NSURL URLWithString:@"https://graph.facebook.com/me/feed"];
ASIFormDataRequest *newRequest = [ASIFormDataRequest requestWithURL:url];
[newRequest setPostValue:message forKey:@"message"];
[newRequest setPostValue:href forKey:@"link"];
[newRequest setPostValue:accessToken forKey:@"access_token"];
[newRequest setDidFinishSelector:@selector(postToWallFinished:)];
[newRequest setDelegate:self];
[newRequest startAsynchronous];
有了:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en" xmlns:og="http://ogp.me/ns#">
<head>
<title>Foobar</title>
<!-- Facebook meta tags -->
<meta property="og:title" content="meta title"/>
<meta property="og:url" content="http://www.foo.com"/>
<meta property="og:image" content="http://www.foo.com/bar.png"/>
<meta property="og:site_name" content="meta site name"/>
<meta property="fb:admins" content="123"/>
<meta property="og:description" content="meta description"/>
<meta property="og:type" content="website"/>
<!-- <meta property="og:video" content="http://www.foo.com/bar.swf"/> -->
<!-- <meta property="og:video:width" content="1200"/> -->
<!-- <meta property="og:video:height" content="800"/> -->
...
謝謝VENU ......我還有一個疑問,如何設置「標題」或「說明」參數新的生產線......請給我你的想法... –
你不能設置換行符。 – Venu
\ n不支持...任何想法... –