REST API video.upload作为粉丝页面,无效令牌

时间:2011-03-08 15:54:13

标签: facebook-c#-sdk

我似乎无法正确上传视频作为粉丝页面的语法,视频上传在我作为用户时可以正常工作,但在为粉丝页面指定访问令牌时却不行(下面的代码示例):

        var mediaObject = new FacebookMediaObject
        {
            FileName = fileName,
            ContentType = "video/" + videoType
        };

        mediaObject.SetValue(videoData);

        dynamic parameters = new ExpandoObject();
        parameters.source = mediaObject;
        parameters.title = Title;
        parameters.description = Description;
        parameters.method = "video.upload";

        // Get the access token of the posting user if we need to
        if (userID != this.FacebookAccount.UserAccountId)
        {
            parameters.access_token = this.getPostingUserAuthToken(userID);
        }
        else
        {
            parameters.access_token = this.FacebookAccount.SessionKey;
        }

        dynamic publishResponse = this.FacebookConnection.Post(parameters);

我没有照片/状态消息作为粉丝页面的问题,并且用户具有manage_pages权限。

请允许任何人指出我在正确的方向,所有我回来的都是'无效的OAuth 2.0令牌'。

谢谢!

1 个答案:

答案 0 :(得分:1)

我试图这样做一段时间,虽然我没有成功。我认为它存在漏洞,或者由于此错误而无法将视频上传到粉丝页面:http://bugs.developers.facebook.net/show_bug.cgi?id=6283