I am doing an instagram appliaction. In that I need to post like on Images. I am not able to post . I am following instgram API. We need to use following url
https://api.instagram.com/v1/media/{media-id}/likes
We need to set media id like
https://api.instagram.com/v1/media/649114513807113248_1032025382/likes
media id = 649114513807113248_1032025382
My code to post:
NSString *urlString = [NSString stringWithFormat:@"https://api.instagram.com/v1/media/649114513807113248_1032025382/likes"];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:urlString]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:60.0];
[request setHTTPMethod:@"POST"];
NSURLConnection *connection= [[NSURLConnection alloc] initWithRequest:request
delegate:self];
[connection start];
But like is not posting. Can anyone help me ?