Post to user's Facebook wall with iPhone using latest FBConnect SDK

人走茶凉 提交于 2019-11-28 19:58:54

Have you looked at DemoApp under the sample directory in facebook-ios-sdk? There's a publishStream method that might help.

Or, you can use

- (void)requestWithGraphPath:(NSString *)graphPath
                   andParams:(NSMutableDictionary *)params
               andHttpMethod:(NSString *)httpMethod
                 andDelegate:(id <FBRequestDelegate>)delegate;

like this:

[_facebook requestWithGraphPath:@"[user_id]/feed" 
                      andParams:[NSMutableDictionary dictionaryWithObject:@"test wall post" forKey:@"message"]
                  andHttpMethod:@"POST"
                    andDelegate:self];

to post a comment to [user_id]'s wall.

bharath gangupalli

U ckeck this , its in detail:

NSMutableDictionary* params1 = [NSMutableDictionary dictionaryWithObjectsAndKeys:
                                    appId, @"api_key",
                                    @"Please join me...", @"message",
                                      @"https://www.mybantu.com", @"link",
                                    @"https:/www.mybantu.com/myphoto.png", @"picture",
                                    @"my profile", @"name",
                                    @"hi to all", @"description",
                                      //    @"100001309042820", @"target_id",
                                    nil];
    [facebook requestWithGraphPath:@"[friend_ID]/feed" andParams:params1 andHttpMethod:@"POST" andDelegate:self];

WE cannot use facebook profile or photo here, Get from other sites or ur own site profile.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!