コード例 #1
0
        public PhotoEntryFull SaveWallPhoto(PhotoUploadedInfo photoInfo, int? userId, int? groupId)
        {
            this.Manager.Method("photos.saveWallPhoto", new object[] { "server", photoInfo.Server,
                                                                        "photo", photoInfo.Photo,
                                                                        "hash", photoInfo.Hash,
                                                                        "uid", userId, "gid", groupId});

            return this.buildPhotoEntryFull(this.Manager.Execute().GetResponseXml());
        }
コード例 #2
0
ファイル: VK.cs プロジェクト: SnoUweR/iTunesSVKS-2
        private PhotoUploadedInfo UploadPhoto(int userId, string photoPath)
        {
            HttpUploaderFactory uf = new HttpUploaderFactory();
            NameValueCollection files = new NameValueCollection();

            string uploadUrl = _photosFactory.GetWallUploadServer(userId, null);
            files.Add("photo", photoPath);

            PhotoUploadedInfo ui = new PhotoUploadedInfo(uf.Upload(uploadUrl, null, files));

            return ui;
        }