私はGraph APIを使用して、Facebookにログインして友達リストを取得しました。グラフAPIを使用してFacebookの壁にメッセージを投稿
今、私は壁にメッセージを掲示する必要があります。どうやって?
私はGraph APIを使用して、Facebookにログインして友達リストを取得しました。グラフAPIを使用してFacebookの壁にメッセージを投稿
今、私は壁にメッセージを掲示する必要があります。どうやって?
が壁に投稿するためのURLを使用して壁
- (void)postToWall
{
FBStreamDialog *dialog = [[[FBStreamDialog alloc] init] autorelease];
dialog.userMessagePrompt = @"Enter your message:";
dialog.attachment = [NSString stringWithFormat:@"{\"name\":\"Facebook Connect for iPhone\",\"href\":\"http://developers.facebook.com/connect.php?tab=iphone\",\"caption\":\"Caption\",\"description\":\"Description\",\"media\":[{\"type\":\"image\",\"src\":\"http://img40.yfrog.com/img40/5914/iphoneconnectbtn.jpg\",\"href\":\"http://developers.facebook.com/connect.php?tab=iphone/\"}],\"properties\":{\"another link\":{\"text\":\"Facebook home page\",\"href\":\"http://www.facebook.com\"}}}"];
[dialog show];
}
にポストのためにこの方法を使用また、公式のFacebookで公開していること、デモからiOS版Facebookの開発のために、壁や他の重要な練習を公開する方法を学ぶことができます"Hackbook for iOS"
NSMutableDictionary * variables = [NSMutableDictionary dictionaryWithCapacity:1];
[variables setObject:@"this is a test message: postMeFeedButtonPressed" forKey:@"message"];
FbGraphResponse *fb_graph_response = [fbGraph doGraphPost:@"yourFriendFbID/feed" withPostVars:variables];
SBJSON *parser = [[SBJSON alloc] init];
NSDictionary *facebook_response = [parser objectWithString:fb_graph_response.htmlResponse error:nil];
[parser release];
あなたの壁に投稿したい場合は、あなたがこの
NSString *message = @"some text";
NSMutableDictionary* params = [NSMutableDictionary dictionaryWithObjectsAndKeys:message, @"message",nil];
[fb requestWithGraphPath:@"me/feed" andParams:params andHttpMethod:@"POST" andDelegate:self]; //fb here is the FaceBook instance.
ようにそれを行うことができますし、確かにあなたは、ユーザーのログイン後にそれを行います]ダイアログを表示せずに、あなたのFBアプリを考えて、認可しましたパーミッション。
あなたは友人の壁やあなたの壁を意味しますか? –
私の壁にのみ – Ranga
私の答えを確認plz –