【问题标题】:Posting Feeds to Facebook using Graph API - Server side使用 Graph API 将 Feed 发布到 Facebook - 服务器端
【发布时间】:2012-02-07 21:06:29
【问题描述】:

我正在尝试从我的网站向个人 Facebook 墙和粉丝页面墙发布供已登录用户使用的提要。

<cfhttp url="https://graph.facebook.com/me/feed" method="post">
    <cfhttpparam name="access_token" value="#variables.accessToken#" type="formfield">
    <cfhttpparam name="message" value="#arguments.message#" type="formfield">
    <cfhttpparam name="link" value="#arguments.link#" type="formfield">
    <cfhttpparam name="name" value="#arguments.name#" type="formfield">
    <cfhttpparam name="caption" value="#arguments.caption#" type="formfield">
    <cfhttpparam name="description" value="#arguments.description#" type="formfield">
    <cfhttpparam name="picture" value="#arguments.picturePath#" type="formfield">
</cfhttp>

这是根据developers.facebook.com 的代码和http://net.tutsplus.com/tutorials/php/wrangling-with-the-facebook-graph-api/ 的示例

这只是我认为参数含义的一个示例:

但是当它贴到墙上时,会发生以下情况:

  • 消息、图片、名称、标题和描述正确显示
  • 但是链接没有,图片指向自己,名字上的链接指向图片。

在参考了很多帖子之后,我想我会发布这个。

请帮忙。

【问题讨论】:

  • 请添加 linting 正在发布的 url 的结果。短绒在这里:developers.facebook.com/tools/lint
  • 这是我在链接选项中提供的 URL:traffikworks.com/community.html
  • 你也应该给出协议。所以试试这个:http://www.traffikworks.com/community.html(我放了 www,因为我看到你用 301 重定向浏览器)

标签: facebook facebook-graph-api coldfusion coldfusion-9


【解决方案1】:

您也应该提供协议。

所以试试这个: http://www.traffikworks.com/community.html

(我放了 www,因为你还是用 301 重定向浏览器)

【讨论】:

  • 我这样做了,但还是不行。问题是图像上的链接和名称指向图像而不是我设置的链接。
  • 我认为如果您的网址不起作用,或者可能是某处覆盖了链接参数,就会发生这种情况。我只是建议在您的服务器上放置几行代码,以将 POST 请求字段存储在文件中。调用该脚本而不是 graph.facebook.com/me/feed ,您将看到问题所在。如果 POST 快照包含您尝试发布的相同 url,您将知道您的代码有效。
猜你喜欢
  • 1970-01-01
  • 2017-05-31
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多