Reputation: 1941
I implemented the Facebook iOS API / SDK into my application and it works fine. I'm e.g. able to read the name of the logged in user etc.
So the question:
I have several view Controllers with videos in it. The user is logged in with his Facebook account and should be able to post a comment or like the video. Other users should be able to see the previous comments as a list.
I already created a Facebook application on Facebook.com
.
What should I do next? Do I have to do create some "lists" on Facebook.com which I can GET
and display via the Facebook API
?
Upvotes: 0
Views: 5074
Reputation: 57
NSMutableDictionary *res = [NSMutableDictionary dictionaryWithObjectsAndKeys:@"This is my comment", @"message", YOUR ACCESS TOKEN,@"access_token",nil];
[FBRequestConnection startWithGraphPath:[NSString stringWithFormat:@"%@/comments",PHOTO'S ID] parameters:res HTTPMethod:@"POST" completionHandler:^(FBRequestConnection *connection, id result, NSError *error) {
if (error)
{
NSLog(@"error: %@", error.localizedDescription);
}
else
{
NSLog(@"ok!! %@",result);
}
}];
Upvotes: 1
Reputation: 13713
Check out this tutorial for facebook on iphone
EDIT : Ok, about the list I think it will be best if you store it in the user's device (or preferably a remote database) because keeping track of user comments specific to your application through facebook is too cumbersome (I am not familiar with FB API which returns a list of comments for a specific app so check that as well)
Posting to the User’s Wall is easy and well explained here (Goto "Posting to the User’s Wall" somewhere in the middle of the page).
Upvotes: 0