自分のWallに投稿するロジック
※Facebook SDK Ver3.1になって、参照・書込の権限が分離されているので、書き込む場合は別途権限を取得する必要がある。
if(FBSession.activeSession.isOpen){
if([FBSession.activeSession.permissions indexOfObject:@"publish_stream"] == NSNotFound){
[FBSession.activeSession reauthorizeWithPublishPermissions:[NSArray arrayWithObjects:@"publish_stream", nil] defaultAudience:FBSessionDefaultAudienceFriends completionHandler:^(FBSession* session, NSError* error){
}];
}
NSMutableDictionary* paramDict = [[NSMutableDictionary alloc] initWithObjectsAndKeys:
@"This is test column", @"message", nil];
[FBRequestConnection startWithGraphPath:@"me/feed" parameters:paramDict HTTPMethod:@"POST"
completionHandler:^(FBRequestConnection* connection, id result, NSError* error){
DLog(@"error : %@", error);
DLog(@"result : %@", result);
}];
}
Author And Source
この問題について(自分のWallに投稿するロジック), 我々は、より多くの情報をここで見つけました https://qiita.com/hondasports8/items/303a3f9367926fb658a3著者帰属:元の著者の情報は、元のURLに含まれています。著作権は原作者に属する。
Content is automatically searched and collected through network algorithms . If there is a violation . Please contact us . We will adjust (correct author information ,or delete content ) as soon as possible .