2012-04-16 19 views
-1

私は私の友達に挨拶を投稿する必要があるアプリケーションで働いています。友達にメッセージを投稿Facebook Wall投稿

私はそれをどのように実行できますか?誰かが分かっていれば私を助けてください。

ありがとうございました。

答えて

2

この

NSMutableDictionary *parmaDic = [NSMutableDictionary dictionaryWithCapacity:4]; 
[parmaDic setObject:[NSString stringWithFormat:@"hello world"] forKey:@"message"]; // if you want send message 
[parmaDic setObject:@"http://icon.png" forKey:@"picture"]; // if you want send picture  
[parmaDic setObject:@"Create post" forKey:@"name"];   // if you want send name  
[parmaDic setObject:@"Write description." forKey:@"description"]; // if you want description 

[_facebook requestWithGraphPath:[NSString stringWithFormat:@"/%@/feed",facebook_user_id] 
         andParams:parmaDic 
        andHttpMethod:@"POST" 
        andDelegate:self]; 

は、私は、絵..etcはhttp://developers.facebook.com/docs/reference/api/post/

1

はここであなたにお友達のウォールに投稿したいあなたのデータを追加最初の辞書を取る参照してください。キーlike.messageを使用してみてください。 -

NSMutableDictionary *postVariablesDictionary = [[NSMutableDictionary alloc] init]; 
//posting the text written in the textView 
[postVariablesDictionary setObject:self.TextView.text forKey:@"message"]; 

[objDelegate.facebook requestWithGraphPath:[NSString stringWithFormat:@"%@/feed",friendId] andParams:postVariablesDictionary andHttpMethod:@"POST" andDelegate:nil]; 

どのようにデータが友人の壁に掲示されるのですか? うまくいけばありがとう:)

関連する問題