使用最新的FBConnect SDK在iPhone上发布到用户的Facebook墙

jmu*_*phy 2 post fbconnect facebook-graph-api ios facebook-ios-sdk

我很难找到FBConnect iPhone SDK的任何好文档.我已经设置了SDK来获取用户的权限,但做一个简单的帖子就是逃避我.我能找到的只是PHP Web SDK的文档.

任何人都可以向我指出iPhone SDK的一些文档,或者让我知道如何使用最新的图表FBConnect SDK发布到用户墙?

谢谢!

don*_*kim 11

你看过sample目录下的DemoApp facebook-ios-sdk吗?有一种publishStream方法可能有所帮助.

或者,你可以使用

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

像这样:

[_facebook requestWithGraphPath:@"[user_id]/feed" 
                      andParams:[NSMutableDictionary dictionaryWithObject:@"test wall post" forKey:@"message"]
                  andHttpMethod:@"POST"
                    andDelegate:self];
Run Code Online (Sandbox Code Playgroud)

发表评论到[user_id]墙上.