使用 facebook api 将视频传输到 iphone 应用程序

发布于 2024-12-11 04:34:05 字数 450 浏览 0 评论 0原文

我正在构建一个 iPhone 应用程序,用于读取上传的视频、上传的照片和来自 Facebook 的帖子。 照片和视频不是来自提要,而是来自相册。因此,我获得了应用程序的访问令牌,并使其适用于照片和帖子。但是当我尝试获取视频时,它返回以下错误:

{ “错误”: { "message": "请求此资源需要用户访问令牌。", “类型”:“OAuthException” } 任何

我使用的以下权限是: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

人都可以帮助我吗?

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?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

罗罗贝儿 2024-12-18 04:34:05

您使用什么 URL 来发送请求?

我能够使用以下 URL 检索用户上传的视频: https://graph.facebook .com/me/videos/uploaded?access_token=myaccesstoken

我使用了以下权限:user_videos、offline_access、publish_stream。我认为你只需要 user_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];

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];
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文