2012-06-27 42 views

回答

0

添加其他參數與關鍵字典作爲鏈接

FYI:https://developers.facebook.com/docs/reference/api/post/

+0

謝謝VENU ......我還有一個疑問,如何設置「標題」或「說明」參數新的生產線......請給我你的想法... –

+0

你不能設置換行符。 – Venu

+0

\ n不支持...任何想法... –

0

你可以做這樣的事情:

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"/> --> 
    ... 
+0

謝謝樂高... –

+0

很高興我能幫上忙。你可以贊成甚至接受我的回答。只需點擊upvote標誌或upvote標誌下方的複選框(兩者均位於答案的左側)。同樣適用於@Venu的回答:] – borisdiakur

相關問題