使用Graph API - 服务器端将Feed发布到Facebook

时间:2012-02-07 21:06:30

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

我正在尝试将订阅源发布到我的网站上的个人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/

的样本

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

enter image description here

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

  • 消息,图片,名称,标题和说明正确显示
  • 但链接没有,图片指向自身,名称上的链接指向图片。

在提到很多帖子后,我以为我会发布这个帖子。

请帮忙。

1 个答案:

答案 0 :(得分:0)

你也应该给出协议。

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

(我把www放了,因为你无论如何都要用301重定向浏览器)