我正在使用此代码在博客上创建新帖子,但我正在搜索如何使用我们的帖子附加和上传图片。
Imports Google.GData.Blogger
Imports Google.GData.Client
Dim service As New BloggerService("<my apps name>")
service.Credentials = New GDataCredentials("<email>", "<apps password>")
Dim newPost As AtomEntry = New AtomEntry()
newPost.Title.Text = "Test Title"
newPost.Content = New AtomContent()
newPost.Content.Content = "<h2>Test HTML Content</h2>"
newPost.Content.Type = "html"
Dim response As AtomEntry = Nothing
Dim blogFeedUri As Uri = New Uri("http://www.blogger.com/feeds/" + "<blog ID here>" + "/posts/default")
response = service.Insert(blogFeedUri, newPost)
答案 0 :(得分:4)
没有直截了当的方式。在Blogger上传的图片首先上传到Picasaweb。因此,您需要使用Picasa以及Blogger API。
您可以尝试以下步骤: