ios swift 2 post facebook page 代表专页
ios swift 2 post on facebook page on behalf of the page
facebook 在页面上为 post 提供了以下代码,但是我无法找到代码的 swift 版本,同时考虑到 facebook 已移至 FBSDKGraphRequest v2.6
NSDictionary *params = @{
@"message": @"This is a test message",
};
/* make the API call */
FBSDKGraphRequest *request = [[FBSDKGraphRequest alloc]
initWithGraphPath:@"/{page-id}/feed"
parameters:params
HTTPMethod:@"POST"];
[request startWithCompletionHandler:^(FBSDKGraphRequestConnection *connection,
id result,
NSError *error) {
// Handle the result
}];
facebook 在页面上为 post 提供了以下代码,但是我无法找到代码的 swift 版本,同时考虑到 facebook 已移至 FBSDKGraphRequest v2.6
NSDictionary *params = @{
@"message": @"This is a test message",
};
/* make the API call */
FBSDKGraphRequest *request = [[FBSDKGraphRequest alloc]
initWithGraphPath:@"/{page-id}/feed"
parameters:params
HTTPMethod:@"POST"];
[request startWithCompletionHandler:^(FBSDKGraphRequestConnection *connection,
id result,
NSError *error) {
// Handle the result
}];