W00di W00di - 6 months ago 16
iOS Question

Want to upload youtube video link on facebook users wall

Hi i am working on an application in which i need to upload a you-tube uploaded video on Facebook using URL or we can say i want to post an URL on Facebook.I have integrated Facebook into my application and i can upload photos on Facebook wall but not able to upload video by URL.

Please help me if any one knows

Answer

well, it sound like you have the Graph API up and running?

In that case simply post your URL as a massage like this:

-(void)postMessageOnUsersWall:(NSString*)msg
{
    NSMutableDictionary *params = [NSMutableDictionary dictionaryWithObjectsAndKeys:
                                   msg, @"message", // The status message
                                   nil];

    [self.facebook requestWithGraphPath:@"me/feed" andParams:params andHttpMethod:@"POST" andDelegate: self];
}