Golang Facebook API huandu/facebook 发布描述问题。

huangapple go评论84阅读模式
英文:

Golang facebook api huandu/facebook Post Description issue

问题

package main

import (
"fmt"
fb "github.com/huandu/facebook"
)

func main() {
res, e := fb.Post("/97876588/feed", fb.Params{
"type": "link",
"name": "test news is here",
"caption": "The caption of a link in the post",
"picture": "http://img.tvguide.dk/tvnyheder/39ecaf74dbfa71c79225705c0d36bb09.jpg",
"link": "http://img.tvguide.dk/tvnyheder/39ecaf74dbfa71c79225705c0d36bb09.jpg",
"description": "hendes lille datter foregik nemlig under helt andre omstændigheder,er Tina Lund.",
"access_token": "access-token",
})
fmt.Println(e)
fmt.Println(res)
}

你好,我正在使用golang的huandu/facebook作为Oath客户端来发布文章,但是描述和名称字段没有被发布,只有状态消息、图片和链接被发布。请帮忙看看问题出在哪里。

英文:

Hi I am using golang huandu/facebook as Oath client to post articles, But the description and name fields does not get posted, only the status message and the image , link get published.. Please help

package main

import (
	"fmt"
	fb "github.com/huandu/facebook"
)

func main() {
	res, e := fb.Post("/97876588/feed", fb.Params{
		"type": "link",
		"name": "test news is here",
		"caption": "The caption of a link in the post ",
		"picture": "http://img.tvguide.dk/tvnyheder/39ecaf74dbfa71c79225705c0d36bb09.jpg",
		"link":"http://img.tvguide.dk/tvnyheder/39ecaf74dbfa71c79225705c0d36bb09.jpg",
		"description":"hendes lille datter foregik nemlig under helt andre omstændigheder,er Tina Lund.",
		"access_token": "access-token",
	})
	fmt.Println(e)
	fmt.Println(res)
}

答案1

得分: 1

我发现问题所在,只是因为我链接到了jpeg文件,当放置一个正确的链接时,它就完美地工作了。

英文:

I found the problem , it is just because of i am linking to the jpeg file, when place a proper link it works perfect..

huangapple
  • 本文由 发表于 2016年10月30日 20:24:18
  • 转载请务必保留本文链接:https://go.coder-hub.com/40329025.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定