发布到/ PROFILE_ID /链接仅接受链接和消息参数

时间:2012-05-02 16:22:57

标签: api facebook-graph-api hyperlink posting

根据文档,链接端点将图片,名称和描述作为参数。 来自发布部分下的https://developers.facebook.com/docs/reference/api/

Method                  Description                         Arguments

/PROFILE_ID/links   Publish a link on the given profile     link, message, picture, name, caption, description

但是当我尝试这些参数时会被忽略。下面的Python示例。

res = requests.post("https://graph.facebook.com/me/links", 
                    data = {'access_token':t.auth_payload,
                            'message':'testing',
                            'link':'http://percolate.com',
                            'picture':'http://i.zdnet.com/blogs/facebook_news_feed.png',
                            'caption':'this is a caption', 
                            'description':'this is a description', 
                            'name':'this is a name'})

结果是:

This is the result

2 个答案:

答案 0 :(得分:1)

有关为用户创建链接的文档仅说明以下内容:

  

您可以代表用户发布链接,方法是使用publish_stream权限和以下参数向PROFILE_ID / feed发出HTTP POST请求。

     

参数:链接和消息

其他字段取自“link”参数中给出的页面URL的元数据。

https://developers.facebook.com/docs/reference/api/user/

答案 1 :(得分:0)

跟进此问题。链接端点变得越来越无用,而/ feed端点最终具有我需要的功能。 / feed用于在发布链接时丢失共享操作。那已经解决了。

如果您遇到链接端点问题。切换到/ Feed,看看它是否满足您的需求。