I want to check if the user has liked my page or not. Here, I initialise the request for a list of likes the user has...
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
if ([defaults objectForKey:@"FBAccessTokenKey"] && [defaults objectForKey:@"FBExpirationDateKey"])
{
[self.facebook setAccessToken:[defaults objectForKey:@"FBAccessTokenKey"]];
[self.facebook setExpirationDate:[defaults objectForKey:@"FBExpirationDateKey"]];
}
if (![self.facebook isSessionValid])
{
[self.facebook authorize:[[NSArray alloc] initWithObjects:@"publish_stream, user_likes", nil]];
}
else
{
[self.facebook requestWithGraphPath:@"me/likes" andParams:nil andHttpMethod:@"POST" andDelegate:self];
}
The code executes to requestWithGraphPath. However it never works, I get "The operation couldn’t be completed. (facebookErrDomain error 10000.)".