1
我想用Open Graph API复制Facebook动作链接。我有下面的代码片段:Facebook图形API和动作链接
HTTParty.post("https://graph.facebook.com/me/feed", query: { message: "...", picture: "...", access_token: "...", actions: [{ link: "http://google.com", name: "Example" }] })
但是它返回(我不知道为什么):
{"error":{"type":"OAuthException","message":"(#100) The post's action links must be valid URLs."}}
任何人有使用图形API操作链接的经验吗?
也许尝试URL编码?或者出于某种原因将www从“http://google.com”中删除可能会导致问题 – DSchultz
@DSchultz试图添加“www”(没有运气)。我如何对其进行网址编码? –
url_encoded_string = CGI :: escape(“http://www.google.com”) – DSchultz