using facebook api to get videos to iphone app
I am building an iphone app that reads the videos uploaded , photos uploaded and posts from facebook. The photos and the videos are not from the feed, they are from the albums. So I got an access token for my app and got it working for the photos and posts. But when I try to get the videos it returns me the following error:
{ "error": { "message": "A user access token is required to request this resource.", "type": "OAuthException" } }
the following permissions that I used are: scope=user_about_me,publish_checkins,read_stream,publish_stream,manage_pages,user_videos,offline_access,user_photo_video_tags,user_likes,user_checkins,rsvp_event,user_location,publish_actions
can anyone help me?
What URL are you using for the request?
I was able to retrieve user's uploaded videos using this URL: https://graph.facebook.com/me/videos/uploaded?access_token=myaccesstoken
I used the following permissions: user_videos,offline_access,publish_stream. I think you only need the user_videos to get the user's videos.
NSString *urlString = [NSString stringWithFormat:@"https://graph.facebook.com/me/videos/uploaded?date_format=U&access_token=%@",[authenticationKey_ stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]];
NSURL *url = [NSURL URLWithString:urlString];
videoRequest_ = [ASIHTTPRequest requestWithURL:url];
[videoRequest_ setDelegate:self];
[videoRequest_ startSynchronous];
链接地址: http://www.djcxy.com/p/35468.html